问题:
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
来源:oschina
链接:https://my.oschina.net/stackoom/blog/4365953