远程连接MYSQL提示:Host XXX is not allowed to connect to this MySQL server 解决办法

原因是你的帐号不允许从远程登陆,只能在localhost。
这个时候要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,将"localhost"改称"%"即可。

然后重启MySQL 服务。

原文地址:https://www.cnblogs.com/martin1009/p/2245303.html