idea连接mysql数据库时连接显示错误caching_sha2_password
问题描述
Connection to paradigm@localhost failed.
Unable to load authentication plugin 'caching_sha2_password'.
问题原因
mysql8之前的版本使用的密码加密规则是mysql_native_password,但是在mysql8则是caching_sha2_password,所以需要修改密码加密规则
解决方法
查看用户的密码加密规则
select user,host,plugin,authentication_string from user;
修改密码加密规则
alter user 'root' @'localhost' identified with mysql_native_password by 'root';
注意
‘root’;是把数据库的密码给修改了
还没有评论,来说两句吧...