连接失败!null, message from server: “Host ‘xxxx‘ is not allowed to connect to this MySQL server“


连接数据库。
mysql   -u账号    -p密码
show databases;
use root;  //选择需要改的用户
select user,host from user;   //可以看到user为root,host为localhost的话,说明mysql只允许本机连接,那么外网,本地软件客户端就无法连接了。
update user set host = '%' where user='root';
flush privileges;    //刷新权限

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM