好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

mysql远程连接报错问题 - mysql数据库栏目 - 自学

mysql远程连接报错问题

 

安装完之后成 使用 mysql admin连接报错 

 

ERROR 1130: Host ***.***.***.*** is not allowed to connect to this MySQL server 

 

以下百度查到的,试过可以 

 

说明所连接的用户帐号没有远程连接的权限,只能在本机(localhost)登录。 

需更改 mysql 数据库 里的 user表里的 host项 

把localhost改称% 

 

具体步骤:登陆到 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 | +-----------------------+ | % | | 127.0.0.1 | | localhost.localdomain | +-----------------------+ 3 rows in set (0.00 sec)

 

host已经有了%这个值,所以直接运行命令: 

mysql>flush privileges;

 

再用mysql administrator连接...成功!!!   

查看更多关于mysql远程连接报错问题 - mysql数据库栏目 - 自学的详细内容...

  阅读:42次