Home > Database > Mysql Tutorial > mysql远程连接报错问题_MySQL

mysql远程连接报错问题_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:28:48
Original
1083 people have browsed it

bitsCN.com

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'; 
Copy after login

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) 
Copy after login

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

mysql>flush privileges; 
Copy after login

 

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

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template