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_mysql

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_navicat_02

3. 解决方法

把mysql用户登录密码加密规则还原成mysql_native_password.
参考:

具体操作:输入以下

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

注意:by后面的改成自己的密码

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

4. 结果

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

Navicat连接mysql8报错解决:1251- Client does not support authentication protocol requested by server_解决方法_04