mysql只能localhost连接,解决不允许其他机器去访问
2015-03-25 17:36
363 查看
ERROR 1130: Host ***.***.***.*** is not allowed to connect to this MySQL server
登陆mysql
首先 use mysql;
按照别人提供的方式update的时候,出现错误。
mysql> update user set host='%' where user = 'root';
ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
然后查看了下数据库的host信息如下:
mysql> select host from user where user = 'root';
+-------------+------+
| host | user |
+-------------+------+
| % | root |
| 127.0.0.1 | root |
| MicroLetter | |
| MicroLetter | root |
| localhost | |
+-------------+------+
host已经有了%这个值,所以直接运行命令:
mysql>flush privileges;
登陆mysql
首先 use mysql;
按照别人提供的方式update的时候,出现错误。
mysql> update user set host='%' where user = 'root';
ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
然后查看了下数据库的host信息如下:
mysql> select host from user where user = 'root';
+-------------+------+
| host | user |
+-------------+------+
| % | root |
| 127.0.0.1 | root |
| MicroLetter | |
| MicroLetter | root |
| localhost | |
+-------------+------+
host已经有了%这个值,所以直接运行命令:
mysql>flush privileges;
相关文章推荐
- mysql只能localhost连接,解决不允许其他机器去访问
- mysql只能localhost连接,其他ip连接失败的解决办法
- 解决MySQL其他机器连接不上的问题
- 解决 LINUX mysql不能通过IP连接 只能localhost 权限没问题情况下
- 如何让mysql数据库允许被远程连接访问?就是从其他的电脑连接我的电脑上的mysql
- MySql 只能localhost 和 127.0.0.1访问 不能通过其他IP访问
- 解决mysql中只能通过localhost(127.0.0.1)访问不能通过ip访问的问题
- 如何让mysql数据库允许被远程连接访问?就是从其他的电脑连接我的电脑上的mysql
- 解决debian中安装mysql后其他机器navicat无法连接问题
- 解决mysql中只能通过localhost访问不能通过ip访问的问题
- 从其他主机登陆mysql提示不允许连接的解决办法
- 解决mysql只能使用localhost方式连接,不能使用ip方式连接
- 解决mysql中只能通过localhost访问不能通过ip访问的问题
- mysql默认允许被连接的只有从本机,从其他主机连接会被拒绝,如何让mysql数据库允许被远程连接访问?
- 解决mysql中只能通过localhost访问不能通过ip访问的问题
- 如何让mysql数据库允许被远程连接访问?就是从其他的电脑连接我的电脑上的mysql
- 解决Mysql只能用localhost而不能用ip进行访问的问题
- 解决MySQL其他机器连接不上的问题
- MySQL远程访问权限,允许远程连接的开启及局域网访问慢解决办法
- mysql不支持远程连接的解决办法(#1130 - Host 'localhost' is not allowed to connect to this MySQL server)