Navicat连接MySQL时出现Authentication plugin ‘caching_sha2_password’ cannot be loaded解决方法
Navicat连接MySQL时出现Authentication plugin ‘caching_sha2_password’ cannot be loaded
是因为从mysql8开始加密规则改成了caching_sha2_password,而mysql8之前是mysql_native_password
我们只需把mysql加密规则还原成mysql_native_password即可,当然,升级navicat驱动也行
提示:如果是用DBeaver则不会出现此问题
操作步骤:
1.控制台进入mysql
mysql -u root -p
2.修改加密规则
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
3.更新用户密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
4.刷新权限
FLUSH PRIVILEGES;
5.重置密码
alter user 'root'@'localhost' identified by '123456';
操作完成,再次打开Navicat,连接成功