Linux 安装MySQL,MySQL不允许远程登录 Host 'xxx' is not allowed to connect to this MySQL server

1.登录mysql
mysql -u root -p

2.执行use mysql;
use mysql;

3.修改host
update user set host = '%' where user = 'root';

4.刷新权限
FLUSH PRIVILEGES;

5.测试连接

posted @ 2020-12-17 16:48  PengXingQiang  阅读(248)  评论(0)    收藏  举报