【发布时间】:2016-11-22 07:28:23
【问题描述】:
我在 CentOS 7.1 上安装了 Mysql5.7 和 docker 服务。在本地用命令mysql -u root连接mysql就可以了。但是我尝试使用mysql -u root -h 172.17.0.1时连接失败,其中172.17.0.1是本地docker0的ip地址。
[root@test1 workspace]# mysql -u root -h 172.17.0.1
ERROR 1130 (HY000): Host 'test1.novalocal' is not allowed to connect to this MySQL server
我已经用谷歌搜索了原因并试图授予对 test1.novalocal 的访问权限,但没有幸运。
mysql> grant all on *.* to root@'test1.novalocal' with grant option;
ERROR 1133 (42000): Can't find any matching row in the user table
还有什么线索吗?
【问题讨论】:
-
尝试设置 --skip-name-resolve。