Host XXX is not allowed to connect to this MySQL server

这个错误是说明你没有权限连接这个IP上的MySQL

解决办法:

1.mysql > grant all privileges on *.* to ‘root’@’%’ identified by ‘root’ with grant option;

注:%可以换成任意你允许连接的ip

2.mysql>use mysql;
mysql>select user,host from user;
查看是否存在你所配的ip

这里写图片描述

猜你喜欢

转载自blog.csdn.net/woaigaolaoshi/article/details/51743662
今日推荐