Host “xxx.xxx.xxx.xxx“ is not allowes to connect to this MySQL severe.
原因:
这里的 xxx.xxx.xxx.xxx 是你自己电脑的IP地址,出现这个错误的原因是你的服务器中的数据库之允许本地访问,即从数据库访问,外部连接是访问不到的。
解决方法:
修改MySQL数据库中的 user表格,将host的“localhost”修改为“%”,然后重启MySQL服务。
可以通过代码修改
update user set host='%' where user='root';
......
原创
2018-11-09 10:19:30 ·
619 阅读 ·
0 评论