3.DBeaver 连接 mysql8 报错 Unable to load authentication plugin ‘caching_sha2_password‘.

DBeaver无法连接mysql8,报错:

  • Unable to load authentication plugin ‘caching_sha2_password’.
  • Public Key Retrieval is not allowed

一、问题

Unable to load authentication plugin ‘caching_sha2_password’.
报错截图
在这里插入图片描述
Public Key Retrieval is not allowed
报错截图
在这里插入图片描述

二、解决

mysql8的密码策略和之前的不太一样,所以驱动需要替换成mysql8的驱动

1 打开mvn仓库

地址:https://mvnrepository.com/artifact/mysql/mysql-connector-java
点击最新的,我这里是8.0.22
在这里插入图片描述

2 找出maven配置

<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.22</version>
</dependency>

3 编辑DBeaver驱动

3.1 点击编辑驱动

在这里插入图片描述

3.2 点击添加工件

在这里插入图片描述

3.3 依次填入在mvn找到的maven配置

RELEASE是发布版本,LASTEST是最新版本,我这里选择LATEST,最后点击确定
在这里插入图片描述

3.4 删除原有驱动,点击旧驱动,点击删除,点击是,点击确定

在这里插入图片描述

3.5 点击测试连接,再点击下载

在这里插入图片描述

3.6 发现报错变为Public Key Retrieval is not allowed

在这里插入图片描述

3.7 点击确定,点击驱动属性

接下来解决 Public Key Retrieval is not allowed报错
在这里插入图片描述

3.8 修改allowPublicKeyRetrieval的值为true,点击测试连接

在这里插入图片描述

3.9 显示已连接

在这里插入图片描述

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值