蒙珣的博客

活好当下,做好今天该做的事情。

0%

DBeaver等数据库软件无法加载身份插件的问题

连接mysql 出现:java.sql.SQLException: Unable to load authentication plugin ‘caching_sha2_password‘.

报错Exception during pool initialization.

java.sql.SQLException: Unable to load authentication plugin ‘caching_sha2_password’.

报错与数据库有关的,应该是从MySQL 8.0.4开始, 默认的认证插件从mysql_native_password 变为caching_sha2_password.

参考 https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html

创建新用户和密码参考sql:

CREATE USER ‘yourusername‘@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘youpassword’;