主机“ xxx.xx.xxx.xxx”不允许连接到该MySQL服务器

我只是一个虾纸丫 提交于 2020-07-28 12:55:31

问题:

This should be dead simple, but I cannot get it to work for the life of me. 这本来应该很简单,但是我无法让它在我的一生中发挥作用。
I'm just trying to connect remotely to my MySQL server. 我只是想远程连接到我的MySQL服务器。

connecting as 连接为

mysql -u root -h localhost -p  

works fine, but trying 工作正常,但尝试

mysql -u root -h 'any ip address here' -p

fails with the error 失败并显示错误

ERROR 1130 (00000): Host ''xxx.xx.xxx.xxx'' is not allowed to connect to this MySQL server

In the mysql.user table, there is exactly the same entry for user 'root' with host 'localhost' as another with host '%'. mysql.user表中,具有主机“ localhost”的用户“ root”与具有主机“%”的另一个用户的条目完全相同。

I'm at my wits' end, and have no idea how to proceed. 我处于机智,不知道如何进行。 Any ideas are welcome. 任何想法都欢迎。


解决方案:

参考一: https://stackoom.com/question/6XoZ/主机-xxx-xx-xxx-xxx-不允许连接到该MySQL服务器
参考二: https://oldbug.net/q/6XoZ/Host-xxx-xx-xxx-xxx-is-not-allowed-to-connect-to-this-MySQL-server
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!