mysql 1130、1251错误,解决办法

时间:2021-03-09 13:45:08   收藏:0   阅读:0

ERROR 1130 : HOST "XXXX" is not allowed to connect to this MySQL server 

在 数据库mysql  下 的 db host user 三个表中 把 HOST 添加值  “%” 就 OK了

 

mysql>use mysql; 

mysql>update user set host = ‘%‘ where user =‘root‘;

mysql>flush privileges;

mysql>select `host`,`user` from user where user= ‘root‘;

注意:mysql的用户信息就是存储中mysql数据的user表中的。

 

1251错误:(分三步走)

alter user ‘root‘@‘%‘identified by ‘password‘ PASSWORD EXPIRE NEVER; #更改加密方式

alter user ‘root‘@‘%‘identified with mysql_native_password BY ‘DA88888888‘;#更改密码

 flush privileges; #刷新。

 1045错误:将programdata 里面的data文件夹复制到mysql安装目录

设置空密码路径:mysqld --defaults-file=‘C:\ProgramData\MySQL\MySQL Server 8.0\my.ini‘ --console --skip-grant-tables --shared-memory

  mysqld --console --skip-grant-tables --shared-memory

https://blog.csdn.net/qq_43342301/article/details/91288891

 

技术图片

 

技术图片

 

 技术图片

 

 技术图片

 

 

 技术图片

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!