Authentication plugin 'caching_sha2_password' cannot be loaded

问题: myql8.0版本Authentication plugin 'caching_sha2_password' cannot be loaded:
原因:使用了新的加密规则caching_sha2_password,旧的是mysql_native_password,可通过mysql库的user表字段plugin查看
解决办法:执行对应的账号,修改为mysql_native_password
ALTER USER 'root'@'localhost' IDENTIFIED BY '密码' PASSWORD EXPIRE NEVER; #修改加密规则
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '密码'; #更新一下用户的密码
FLUSH PRIVILEGES; #刷新权限
 
注意: 'root'@'localhost'为对应User表的User和Host.即:使用哪个账号操作报的错就修改哪个
官方说明: https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html

你可能感兴趣的:(Authentication plugin 'caching_sha2_password' cannot be loaded)