unknown error 1130,unknown error 1045

使用navicat 链接MySQL,出现这样的报错:

unknown error 1130,unknown error 1045

解决办法:

在服务器上登录mysql ,并且进入 use mysql:

root@localhost 09:07:  [mysql]> update user set host = '%' where user = 'root';
Query OK, 1 row affected (0.07 sec)
root@localhost 09:12:  [mysql]> flush privileges;
Query OK, 0 rows affected (0.02 sec)

 然后再次使用navicat链接出现:

unknown error 1130,unknown error 1045

解决办法:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION

root@localhost 09:13:  [mysql]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.02 sec)

root@localhost 09:14:  [mysql]> flush privileges;
Query OK, 0 rows affected (0.02 sec)

综上:出现这类错误大概是是数据库当中mysql 中root 用户,设置的权限的问题

希望对你有所帮助

上一篇:1130 数据库操作


下一篇:数据库远程授权--问题解答--如出现--[HY000][1130] null, message from server: “Unknown error 1130“