When using DBeaver to connect to databases, you might encounter the error message “Public Key Retrieval is not allowed.” This issue is common and occurs because DBeaver needs to retrieve a public key from the database server for secure connections. However, by default, this retrieval is disabled for security reasons. This error can prevent successful database connections, making it a relevant concern for users.
The “Public Key Retrieval is not allowed” error in DBeaver occurs when attempting to connect to a MySQL database. This error is due to the MySQL server’s security settings, which prevent automatic retrieval of the public key required for secure connections.
MySQL uses public key cryptography to secure connections. When a client (like DBeaver) connects to the MySQL server, it needs the server’s public key to establish a secure connection. By default, MySQL does not allow clients to automatically retrieve this public key for security reasons.
allowPublicKeyRetrieval
property is not set to true
in the connection settings, DBeaver cannot retrieve the public key, leading to this error.To resolve this, you need to modify the connection properties in DBeaver:
allowPublicKeyRetrieval
and set it to true
.useSSL
to false
if SSL is not required.This configuration change allows DBeaver to retrieve the public key and establish a secure connection.
Here are the common causes of the “DBeaver public key retrieval is not allowed” error:
Public Key Retrieval Disabled:
allowPublicKeyRetrieval
property in the connection settings.Incorrect SSH Server Configuration:
Public Key Not Stored Correctly:
Invalid Public Key Format:
SSL Settings:
useSSL
to false
.These steps should help you troubleshoot and resolve the error.
Here’s a detailed, step-by-step guide to resolve the ‘DBeaver public key retrieval is not allowed’ error:
Open DBeaver:
Edit Connection:
Edit Driver Settings:
Access Driver Properties:
Add New Properties:
allowPublicKeyRetrieval
true
useSSL
false
Save and Test Connection:
These steps should help you bypass the ‘public key retrieval is not allowed’ error in DBeaver.
Enable Public Key Retrieval: In DBeaver, go to Edit Connection > Edit Driver Settings > Connection Properties. Add allowPublicKeyRetrieval=true
.
Disable SSL: Set useSSL=false
in the same Connection Properties section.
Update Database Configuration: Ensure your database server allows public key retrieval by configuring the server settings appropriately.
Use Secure Connections: If disabling SSL, ensure your network is secure to prevent data interception.
Regular Updates: Keep DBeaver and your database drivers up to date to avoid compatibility issues.
Backup Configurations: Regularly backup your connection settings to quickly restore them if needed.
These steps should help maintain a stable and secure connection to your database.
occurs when DBeaver cannot retrieve a public key from the MySQL server for secure connections, due to security settings or incorrect connection properties.
To resolve this issue, users need to modify their connection properties in DBeaver by adding the property 'allowPublicKeyRetrieval=true'
.
Additionally, disabling SSL by setting 'useSSL=false'
can also help.
Proper configuration of database servers and regular updates of DBeaver and drivers are essential for maintaining smooth database connections.
Users should also ensure that their network is secure when disabling SSL.