解决Host 'gateway' is not allowed to connect to this MySQL server
链接mysql时:Host 'gateway' is not allowed to connect to this MySQL server;mysql> use mysql;Database changedmysql> select 'host' from user where user='root'-> ;+------+| host |+-----.
·
链接mysql时:Host 'gateway' is not allowed to connect to this MySQL server;
mysql> use mysql;
Database changed
mysql> select 'host' from user where user='root'
-> ;
+------+
| host |
+------+
| host |
+------+
1 row in set (0.00 sec)
mysql> update user set host = '%' where user ='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> select 'host' from user where user='root';
+------+
| host |
+------+
| host |
+------+
1 row in set (0.00 sec)
mysql> select 'host' from user where user='root';
+------+
| host |
+------+
| host |
+------+
1 row in set (0.00 sec)
按以上步骤操作后,重新链接,亲测成功.
更多推荐
已为社区贡献1条内容
所有评论(0)