36

I use DBeaver to watch an SQL database on MySQL 8+.

Everything is working, but sometimes, opening DBeaver, I have the following error message :

Public Key Retrieval is not allowed

And then, DBeaver can't connect to MySQL.

In order to fix this problem, I have to reconfigure MySQL.

Is there any simplest way to fix this problem ?

Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
Alex Dana
  • 1,076
  • 3
  • 14
  • 30
  • can elaborate what you have done so far started a new connection in dbeaver and add ssl support and added your crt file in the appropriate textbox and then comes the error? – nbk May 14 '20 at 20:27
  • I solved this problem with below settings [enter image description here](https://i.stack.imgur.com/BMBl6.jpg) – dungvt Apr 04 '21 at 04:19

4 Answers4

91

Change the settings on Dbeaver:

  1. Right click your connection, choose Edit Connection
  2. On the Connection settings screen (main screen) click on Edit Driver Settings enter image description here
  3. Click on Connection properties
  4. Right click the User Properties area and choose Add new property
  5. Add two properties: useSSL and allowPublicKeyRetrieval enter image description here
  6. Set their values to false and true respectively by double clicking on the value column
  7. Save and test the connection.

Hopefully it should work!

Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
Ratish Bansal
  • 1,982
  • 1
  • 10
  • 19
33

Edit Connection

click second tab Driver Properties

Change property allowPublicKeyRetrieval to True

Connection settings or Driver properties:

enter image description here

Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
OxaCyber
  • 431
  • 5
  • 3
15

Did you try explicitly allowing public key retrieval in DBeaver? In the connection settings, SSL tab you can find it

enter image description here

This is in case you are using SSL, otherwise in the same screen you can disable SSL by unchecking "use SSL" and "require SSL"

Carlos Robles
  • 10,828
  • 3
  • 41
  • 60
2

Ratish Bansal's solution works for me on MacOS Mojave, and after that, I always get a timezone error. The solution for that is to set my local timezone in the connection settings:

enter image description here

agm1984
  • 15,500
  • 6
  • 89
  • 113