300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > idea连接mysql数据库时连接显示错误caching_sha2_password

idea连接mysql数据库时连接显示错误caching_sha2_password

时间:2019-04-23 10:12:57

相关推荐

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’;是把数据库的密码给修改了

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。