Host 'XXX' is not allowed to connect to this MySQL server 遗失对主机的连接。
解决方法:
原因mysql安装没对其他主机授权访问
1.去mysql安装目录C:\java\mysql5.7\bin下打开cmd输入mysql –u root –p,输入root的密码:
2.执行use mysql
3.执行update user set host = ‘%’ where user = ‘root’;
4.关闭mysql后:net stop MYSQL57,重启:net start MYSQL57