Q: Host is not allowed to connect to this mysql server
1、cmd登入mysql
忘记mysql存储位置怎么进mysql的bin文件?
——从workbench中找到选项卡SERVER——MANAGE ACCESS SETTINGS查看mysq的存储位置
cmd cd进mysql server5.7/bin
mysql -hlocalhost -uroot -p
mysql> show databases;
use mysql;
select host from user where user = 'root';
mysql> update user set host = '%' where user = 'root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.04 sec)
结果:成功解决!