首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

mysql唯其如此localhost连接,解决不允许其他机器去访问

2013-03-19 
mysql只能localhost连接,解决不允许其他机器去访问ERROR 1130: Host ***.***.***.*** is not allowed to c

mysql只能localhost连接,解决不允许其他机器去访问

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;?

热点排行