DBeaver 连接mysql 报错 Public Key Retrieval is not allowed
2024-01-08 05:02:17
问题描述
一段时间没有用本地数据库,使用dbeaver连接mysql报错:Public Key Retrieval is not allowed
原因分析:
Public Key Retrieval is not allowed:不允许进行公钥检索。
解决方案:
在编辑连接中找到allowPublicKeyRetrieval 设置成TRUE
allowPublicKeyRetrieval:允许从服务器上获取公钥
Note
To authenticate accounts with the caching_sha2_password plugin,
either a secure connection to the server using SSL or an
unencrypted connection that supports password exchange using an
RSA key pair (enabled by setting one or both of the connecting
properties allowPublicKeyRetrieval and serverRSAPublicKeyFile)
must be used.
If the MySQL server's default authentication method was SHA256 but neither one of
the Connector/J connection properties allowPublicKeyRetrieval and
serverRSAPublicKeyFile was set, the authentication failed with a
TransientConnectionException, complaining that the public key could not be
retrieved. With this fix, authentication continues in the situation, allowing other
enabled authentication methods to be tried. (Bug #20433047, Bug #75670)
大致意思是说使用caching_sha2_password插件的,这两个属性必须要设置一个。如果两个都没有设置,会抛public key could not be retrieved异常
如果是jdbc连接,则加上对应参数
jdbcUrl=jdbc:mysql://localhost:3306/coin-vue?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
文章来源:https://blog.csdn.net/qq_21271511/article/details/135421655
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!