简体   繁体   English

DBeaver和MySQL之间的连接

[英]Connection between DBeaver & MySQL

I use DBeaver to watch an SQL database on MySQL 8+.我使用 DBeaver 在 MySQL 8+ 上观看 SQL 数据库。

Everything is working, but sometimes, opening DBeaver, I have the following error message:一切正常,但有时打开 DBeaver,我收到以下错误消息:

Public Key Retrieval is not allowed

And then, DBeaver can't connect to MySQL.然后,DBeaver 无法连接到 MySQL。

In order to fix this problem, I have to reconfigure MySQL.为了解决这个问题,我必须重新配置 MySQL。

Is there any simplest way to fix this problem?有没有最简单的方法来解决这个问题?

Change the settings on Dbeaver:更改 Dbeaver 上的设置:

  1. Right click your connection, choose "Edit Connection"右键单击您的连接,选择“编辑连接”
  2. On the "Connection settings" screen (main screen) click on "Edit Driver Settings"在“连接设置”屏幕(主屏幕)上单击“编辑驱动程序设置” 在此处输入图像描述
  3. Click on "Connection properties"点击“连接属性”
  4. Right click the "user properties" area and choose "Add new property"右键单击“用户属性”区域并选择“添加新属性”
  5. Add two properties: "useSSL" and "allowPublicKeyRetrieval"添加两个属性:“useSSL”和“allowPublicKeyRetrieval” 在此处输入图像描述
  6. Set their values to "false" and "true" by double clicking on the "value" column通过双击“value”列将它们的值设置为“false”和“true”
  7. Save and test the connection.保存并测试连接。

Hopefully it should work!希望它应该工作!

Edit Connection编辑连接

click second tab "Driver Properties"单击第二个选项卡“驱动程序属性”

Change property allowPublicKeyRetrieval = True更改属性 allowPublicKeyRetrieval = True

Connection settings/Driver properties:连接设置/驱动程序属性:

在此处输入图像描述

Did you try explicitly allowing public key retrieval in DBeaver?您是否尝试过明确允许在 DBeaver 中检索公钥? In the connection settings, SSL tab you can find it在连接设置中,SSL选项卡你可以找到它

在此处输入图像描述

This is in case you are using SSL, otherwise in the same screen you can disable SSL by unchecking "use SSL" and "require SSL"这是在您使用 SSL 的情况下,否则在同一屏幕中,您可以通过取消选中“使用 SSL”和“需要 SSL”来禁用 SSL

Ratish Bansal's solution works for me on MacOS Mojave, and after that , I always get a timezone error. Ratish Bansal 的解决方案适用于我在 MacOS Mojave 上,之后,我总是遇到时区错误。 The solution for that is to set my local timezone in the connection settings :解决方案是在connection settings中设置我的本地时区:

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM