远程连接MYSQL提示Host is not allowed to connect to this MySQL server
改表法
#进入mysql
mysql -u root -p
#使用mysql
use mysql;
# 所有的地址都可以使用root用户来登陆
update user set host = '%' where user ='root';
#刷新
flush privileges;
#退出
/p
#从新启动
[root@cwsstudy ~]# systemctl restart mysql
systemctl status mysqld 查看状态