MySQL8.0:Host is not allowed to connect to this MySQL server

 

1、执行登陆MySQL mysql -u root -p 密码
2、执行use mysql;
3、执行update user set host = '%' where user = 'root';
4、执行FLUSH PRIVILEGES;

注意:四步骤缺一不可

你可能感兴趣的:(MySQL)