我已经在远程Ubuntu计算机上安装了MySQL服务器。通过以下方式root
在mysql.user
表中定义用户:
mysql> SELECT host, user, password FROM user WHERE user = 'root';
+------------------+------+-------------------------------------------+
| host | user | password |
+------------------+------+-------------------------------------------+
| localhost | root | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| ip-10-48-110-188 | root | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 127.0.0.1 | root | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| ::1 | root | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
+------------------+------+-------------------------------------------+
我可以root
使用标准mysql
客户端从同一远程计算机命令行界面与用户访问。现在,我想允许来自Internet上每台主机的root用户访问权限,因此我尝试添加以下行(它与上一个转储的第一行完全相同,但该host
列除外):
mysql> SELECT host, user, password FROM user WHERE host = '%';
+------------------+------+-------------------------------------------+
| host | user | password |
+------------------+------+-------------------------------------------+
| % | root | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
+------------------+------+-------------------------------------------+
但是我的个人PC上的客户端继续告诉我(我掩盖了服务器IP):
SQL错误(2003):无法连接到“ 46.xxx”上的MySQL服务器(10061)
我不知道是身份验证错误还是网络错误。在服务器防火墙上,我为端口3306 / TCP启用了0.0.0.0/0,这对我来说还可以...
bind-address
在my.cnf中查找