Mysql解决Authentication plugin ‘caching_sha2_password‘ cannot be loaded

1、登录Mysql

mysql -u root -p

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;

 

4、重置密码
//此处请自定义密码
alter user 'root'@'localhost' identified by '自定义的密码';

posted on 2023-04-22 22:20  春分夏至  阅读(72)  评论(0编辑  收藏  举报

导航