连接远程数据库出现host is not allow to connect

在装了mysql的地方输入mysql -u root -p登录

show databases

找到mysql数据库

use 进入数据库

show tables 找到user表

然后把user表中的host的localhost改成%

最后执行FLUSH PRIVILEGES

 

posted @ 2022-12-20 09:17  d森林d  阅读(73)  评论(0)    收藏  举报