SQLSTATE[HY000] [1130] Host 'DESKTOP-O0CRH8F' is not allowed to connect to this MySQ

来源:转载

1.发生这种情况是由于没有MySQL没有赋予权限;

2.打开MySQL 5.7 Command Line Client,输入密码进入;


3.输入以下命令(大小写都可以):

mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION; 
mysql>flush privileges; 

mysql>exit;


分享给朋友:
您可能感兴趣的文章:
随机阅读: