is not allowed to connect tothis mmysql server

发现在linux中配置完mysql

开放完端口出现这个问题  

首先在linux中登录MySQL

然后输入  use mysql;

 

mysql> select host from user where user='root';

输入以上两个命令查看主机配置信息

 

 

 

执行 update user set host = '%' where user ='root';

将host设置为通配符模式%    Host设置“%”便可远程访问了

 

最后执行  flush privileges;  是更改的配置立即生效

 

 

posted @ 2019-01-24 18:11  ^_^达❤令  阅读(3548)  评论(0编辑  收藏  举报