← back to the blog

MySQL Public Key Retrieval is not allowed - How to fix DBeaver MySQL connection error

Posted on May 24th, 2020 in PhP, Miscellaneous by George


1) Right-click your failing connection and choose "Edit Connection".

2) On the "Connection settings" screen (main screen) click on "Edit Driver Settings", located at the bottom right


DBeaver MySql 8+


3) Click on "Connection properties"

4) Right-click the "User properties" tab area and choose "Add new property"

5) Add two properties: "useSSL" and "allowPublicKeyRetrieval"

6) Set their values to  "false" and "true" by double-clicking on the "value" column.


edit driver


Now Save and Refresh your connection, Right-Click on the connection, and click Refresh at the bottom.

Everything should work fine at this point. If the error persists, repeat again the steps above.

For some reason, in some cases "allowPublicKeyRetrieval" does not save the value to true. Make sure that this is set to true as per the screenshot.