使用navicat 连接mysql出现1251错误

时间:2021-09-08 17:09:12

最近需要用MYSQL,使用navicat 连接时总出现1251错误,在网上查了一些别人的方法并试过

以下方法是正确的。

方法来自:https://blog.csdn.net/XDMFC/article/details/80263215

错误:Client does not support authentication protocol requested by server; consider upgrading MySQL client

解决方法:

1、打开cmd

2、输入 mysql -u root -p

3、输入密码 进入root用户

4、mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;

5、mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123';

6、mysql> FLUSH PRIVILEGES;