0


Host is not allowed to connect to this MySQL server解决方法

这个错误,其实就是我们安装的MySQL不允许远程登录,解决方法如下:

  1. 在装有MySQL的机器上登录MySQL mysql -u root -p密码,执行如下命令:
use mysql;

select host from user where user = 'root';

该结果表示是当前的root用户限制在当前的ip内访问的,需要修改他的访问域。

  1. 执行命令:
update user set host = '%' where user = 'root';

select host from user where user = 'root';


3.执行 FLUSH PRIVILEGES 或者重启 MySQL 即可;

flush privileges;
标签: mysql

本文转载自: https://blog.csdn.net/dhp1994/article/details/134212344
版权归原作者 itdhp 所有, 如有侵权,请联系我们删除。

“Host is not allowed to connect to this MySQL server解决方法”的评论:

还没有评论