Navicat连接MySQL:1251-Client does not support authentication protocol requested by server

问题:

使用Navicat连接MySQL的时候,出现了一个问题:

1251-Client does not support authentication protocol requested by server; consider upgrading MySQL client

Navicat连接MySQL:1251-Client does not support authentication protocol requested by server_第1张图片

原因:

经查,出现这种情况的原因是:MySQL8 之前的版本中加密规则是mysql_native_password,而在MySQL8之后,加密规则是caching_sha2_password

解决方法:

方法1:升级Navicat驱动

方法2:把mysql用户登录密码加密规则还原成mysql_native_password

现使用方法2解决,具体步骤如下:

1、打开cmd命令行窗口,进入到MySQL的bin目录下。

执行命令:

mysql -u root -p
输入密码,回车。

Navicat连接MySQL:1251-Client does not support authentication protocol requested by server_第2张图片

2、执行下面的命令:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

Navicat连接MySQL:1251-Client does not support authentication protocol requested by server_第3张图片

3、刷新权限,执行命令:

FLUSH PRIVILEGES;
Navicat连接MySQL:1251-Client does not support authentication protocol requested by server_第4张图片

4、连接成功:

Navicat连接MySQL:1251-Client does not support authentication protocol requested by server_第5张图片




感谢您的阅读~


你可能感兴趣的:(SSH网上商城,Navicat,MySQL,1251)