gorm MySql中连接出现 1130 Host ‘LAPTOP-AKP8DH1F’ is not allowed to connect to this MySQL server 的解决方法

依次执行如下命令。
 

use mysql;
select host from user where user='root';
update user set host='%' where user='root';
update user set host = '%' where user ='root’;
flush privileges;

gorm MySql中连接出现 1130 Host ‘LAPTOP-AKP8DH1F’ is not allowed to connect to this MySQL server 的解决方法_第1张图片 

你可能感兴趣的:(mysql,数据库,database)