报错:1130-host ... is not allowed to connect to this MySql server 解决方法
2018-03-21 10:49 Roberto 阅读(4038) 评论(0) 编辑 收藏 举报在windows中连接mysql服务器,提示报错1130,是未开放mysql远程连接 不使用localhost
解决方法--该表:
首先用root登陆数据库:
[root@zabbix ~]# mysql -uroot -pxxxxx
mysql> use mysql;
mysql> update user set host = '%' where user = 'zabbix';
查看是否授权成功:
mysql> select host, user from user;
+-------------+--------+
| host | user |
+-------------+--------+
| % | zabbix |
| 127.0.0.1 | root |
| localhost | |
| localhost | root |
| zabbix | |
| zabbix | root |
+-------------+--------+
6 rows in set (0.00 sec)
加载刚才的设置:
mysql> FLUSH PRIVILEGES;
重新用软件登陆就可登陆成功。