1、连接MySQL报错Unable to load authentication plugin ‘caching_sha2_password’,错误信息如下:
java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.
这是因为MySQL在8.0后验证方式由mysql_native_password变为caching_sha2_password,所以连接时会报这个错,解决办法如下:
在命令行输入
alter user root@localhost identified with mysql_native_password by 'password';
博客指出连接MySQL时出现Unable to load authentication plugin ‘caching_sha2_password’报错,原因是MySQL 8.0后验证方式由mysql_native_password变为caching_sha2_password,并将给出解决办法。
2476

被折叠的 条评论
为什么被折叠?



