mysql报错:2059 - Authentication plugin 'caching_sha2_password' cannot be loaded --解决办法
问题描述
mac本地安装了mysql,通过navicat连接报错:
2059 - Authentication plugin ‘caching_sha2_password’ cannot be loaded
原因
本地现有navicat客户端不支持Mysql8新增加的加密方式:caching_sha2_password
查看mysql版本
解决办法
修改加密方式,将其改为老的加密验证方式:mysql_native_password
1.选择使用mysql数据库
use mysql
2.查看user库相关
select user, plugin from user where user=‘root’;
通过sql查看 user 数据库中的 user,plugin 表,可以看到当前用户的加密方式为:caching_sha2_password
3.修改加密方式
alter user ‘root’@‘localhost’ identified with mysql_native_password by '密码';