mysql8.0.18 开启远程访问

use mysql;
SELECT user,host FROM user;
问题解决#
方法1

CREATE USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘123123‘; //修改密码认证方式为mysql_native_password

GRANT ALL ON *.* TO ‘root‘@‘%‘;

方法2

CREATE USER ‘root‘@‘%‘ IDENTIFIED BY ‘123123‘; //默认的密码认证插件caching_sha2_password

GRANT ALL ON *.* TO ‘root‘@‘%‘;

ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘123123‘;

mysql8.0.18 开启远程访问

上一篇:MYSQL COLLATE


下一篇:mongodb地理坐标范围查询