ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL解决方式

先停止mysql 服务    doc命令: net   stop mysql

然后重启mysql服务    net   start mysql


mysql -u  root   -p


出现Enter password:   直接按回车键    提示welcome to  the MySQL


然后 use  mysql

提示 Datebase changed


输入语句  update user set host='%' where user='root';

提示 query OK,


然后 flush privileges

select host,use from user;


最后QUIT


虽然不知道host=‘%’ 是什么意思   但是好用了

你可能感兴趣的:(mysql)