当出现is not allowed to connect to this MySql server时如何解决
当出现is not allowed to connect to this MySql server时如何解决
1.连接运行数据库的机子 :
1 | mysql -u root -p; |
2.进入mysql数据库:
1 | use mysql; |
3.查一下数据表的host和password
1 | select host,password from user; |
4.修改user表中的host:
1 | update user set Host='%' where User='root'; |
5.刷新下数据库:
1 | flush privileges; |
之后就可以远程连接使用数据库了!!!
结束
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 曦辰Celestiawn!