use mysql;
update user set host = ‘%‘ where user = ‘root‘;
这一句执行完可能会报错,不用管它。执行FLUSH PRIVILEGES;
经过上面4步,就可以解决这个问题了。
host 'xxx.xxx.xxx.xxx' is not allowed to connect to this mysql server 远程服务器数据库 本地无法连接
原文:https://www.cnblogs.com/jokerLiuloss/p/12908799.html