MySQL 无法连接

时间:2023-06-10 20:22:56

Host 'localhost' is not allowed to connect to this MySQL server 错误

解决办法:

C:\Program Files\MySQL\MySQL Server 5.5\my.ini

在[mysqld]下加下面两行,

skip-name-resolve
skip-grant-tables

重启mysql的windows服务,在mysql命令行界面输入

grant all on *.* to ‘root’@’%’ identified by ‘’ with grant option;

flush privileges;