E Host '192.168..' is not allowed to connect to this MySQL server 问题解决!

刚在虚拟机上面安装好MySQL,但是用工具远程连接时候,报错,在cmd模式下,telnet中报E Host '192.168..' is not allowed to connect to this MySQL server。

 

google之后,找到解决方案,在shell模式下,登录mysql控制台

 

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.0.90' IDENTIFIED BY 'mysql' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> select host, user from user;
+---------------------+------+
| host                | user |
+---------------------+------+
| %                   | root |
| 127.0.0.1           | root |
| 192.168.0.90        | root |
| ldap-mysql-svn-trac |      |
| ldap-mysql-svn-trac | root |
| localhost           |      |
+---------------------+------+
6 rows in set (0.00 sec)

mysql>

这样在ip为192.168.0.90的个人电脑的workbench工具里面,就可以用root用户登录了。

你可能感兴趣的:(MYSQL)