Navicat连接mysql8报错解决:1251- Client does not support authentication protocol requested by server

1. 错误描述

navicat连接mysql8.1.0报错,错误信息:1251- Client does not support authentication protocol requested by server;consider upgrading Mysql client。
Navicat连接mysql8报错解决:1251- Client does not support authentication protocol requested by server_第1张图片

2. 错误原因

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

select host,user,plugin,authentication_string from mysql.user;

Navicat连接mysql8报错解决:1251- Client does not support authentication protocol requested by server_第2张图片

3. 解决方法

把mysql用户登录密码加密规则还原成mysql_native_password.
参考:https://blog.csdn.net/pengfeng111833/article/details/124399404

具体操作:输入以下

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

注意:by后面的改成自己的密码
Navicat连接mysql8报错解决:1251- Client does not support authentication protocol requested by server_第3张图片

4. 结果

之后重新使用navicat连接mysql,成功!

Navicat连接mysql8报错解决:1251- Client does not support authentication protocol requested by server_第4张图片

你可能感兴趣的:(#,MySQL,mysql,navicat)