首页 > 其他分享 >Authentication plugin ‘caching_sha2_password‘ cannot be loaded

Authentication plugin ‘caching_sha2_password‘ cannot be loaded

时间:2023-05-23 09:55:46浏览次数:46  
标签:sha2 加密 plugin Authentication mysql caching password root

用navicate登录mysql8.0时报错如下:

Authentication plugin ‘caching_sha2_password‘ cannot be loade

原因是mysql8 之前的版本中加密规则是mysql_native_password,而mysql8之后,加密规则是caching_sha2_password。

解决问题方法有两种,一种是升级navicat驱动,另一种是把mysql用户登录密码加密规则还原成mysql_native_password。

这里使用第二种,修改加密规则:

1、登录Mysql:

cmd

mysql -uroot -proot

2、修改加密规则:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;

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

3、刷新权限重置密码,充值密码步骤不能省略,否则无法连接

FLUSH PRIVILEGES;

alter user 'root'@'localhost' identified by 'root'

标签:sha2,加密,plugin,Authentication,mysql,caching,password,root
From: https://www.cnblogs.com/woshinige/p/17422384.html

相关文章