Navicat连接MySQL出现2059 - authentication plugin 'caching_sha2_password'

1,打开mysql 8.0 Command Line Client
Navicat连接MySQL出现2059 - authentication plugin 'caching_sha2_password'

2,输入密码:进入

Navicat连接MySQL出现2059 - authentication plugin 'caching_sha2_password'

3.首先使用 MySql 数据库自带的命令行客户端工具登录数据库,输入use mysql
Navicat连接MySQL出现2059 - authentication plugin 'caching_sha2_password'

4.从数据库的user表中查询 mysql 用户原来使用的身份验证插件,
Navicat连接MySQL出现2059 - authentication plugin 'caching_sha2_password'
select user,host,plugin,authentication_string from user;

5.将用户Xue使用的身份验证插件 替换为之前版本使用的 mysql_native_password

ALTER USER ‘root’@‘localhost’IDENTIFIED WITH mysql_native_password BY’root’;
Navicat连接MySQL出现2059 - authentication plugin 'caching_sha2_password'

打开navcat,可发现可以正常运行