Home >Database >Mysql Tutorial >mysql的一个拒绝访问错误的解决_MySQL

mysql的一个拒绝访问错误的解决_MySQL

WBOY
WBOYOriginal
2016-06-01 13:47:17977browse

bitsCN.com 最近有几个人问我相同问题,安装了mysql,然后用 telnet ip 3306,端口后报
Host 192.168.1.163 is not allowed to connect to this MySQL serverConnection closed by foreign ,虽然自己以前也碰到过,后来解决了,但是觉得还是值得贴出来,估计会有很多人同样碰到过,
解决办法:
mysql>UPDATE mysql.user SET Host=% WHERE Host=localhost;
mysql>GRANT ALL PRIVILEGES ON *.* TO root@"%" ;
mysql>FLUSH PRIVILEGES;
bitsCN.com

Statement:
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