Unable to load authentication plugin ‘caching_sha2_password
在我使用DBeaver连接MySQL的时候,竟然报错了,错误如下:最后发现问题,是因为MySQL8和MySQL5的一些变更。这是mysql 8.0版本才出现的问题,原因是mysql 8.0 默认使用 caching_sha2_password 身份验证机制 —— 从原来的 mysql_native_password 更改为 caching_sha2_password。8版本前是:default_a
在我使用DBeaver连接MySQL的时候,竟然报错了,错误如下:
Unable to load authentication plugin ‘caching_sha2_password
最后发现问题,是因为MySQL8和MySQL5的一些变更。
这是mysql 8.0版本才出现的问题,原因是mysql 8.0 默认使用 caching_sha2_password 身份验证机制 —— 从原来的 mysql_native_password 更改为 caching_sha2_password。
8版本前是:default_authentication_plugin=mysql_native_password
8版本后是:default_authentication_plugin=caching_sha2_password
参考两篇文章:
解决办法 Unable to load authentication plugin ‘caching_sha2_password
MySQL报错:Unable to load authentication plugin ‘caching_sha2_password‘的解决方案
我的和他们的有一些不一样,他们是在代码中连接失败,或者是需要修改权限,而我这个是数据库连接,同时修改权限这个问题,是不能够的,所以只有想办法了。
后面我发现应该是驱动的问题,我这个DBeaver默认安装的驱动时是mysql5的,修改驱动即可 。
驱动修改成8之后,然后下载,再连接就ok了。
更多推荐
所有评论(0)