Dbeaver ошибка public key retrieval is not allowed

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's user avatar

asked May 12, 2020 at 10:24

Alex Dana's user avatar

2

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's user avatar

answered May 21, 2020 at 17:02

Ratish Bansal's user avatar

Ratish BansalRatish Bansal

1,8821 gold badge10 silver badges19 bronze badges

6

Edit Connection

click second tab Driver Properties

Change property allowPublicKeyRetrieval to True

Connection settings or Driver properties:

enter image description here

Manuel Jordan's user avatar

answered Mar 8, 2021 at 18:00

OxaCyber's user avatar

OxaCyberOxaCyber

4215 silver badges3 bronze badges

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»

answered May 16, 2020 at 6:37

Carlos Robles's user avatar

Carlos RoblesCarlos Robles

10.8k3 gold badges41 silver badges60 bronze badges

0

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

answered Jun 2, 2020 at 22:31

agm1984's user avatar

agm1984agm1984

15k6 gold badges89 silver badges110 bronze badges

no dbeaver does not suck, on the contrary. I need to work and it does not connect.
I installed the newest version of dbeaver 22.0.3.
I startet a mysql 8 database, see above docker-compose snippet for the container.
I try to connect dbeaver to this DB (with 127.0.0.1) with a already stored connection. The error message, see title, appears.
Same with a fresh created connection.

I see 2 errors in the log
eclipse.buildId=unknown
java.version=17.0.6
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64

org.eclipse.ui
Warning
Tue Apr 11 09:36:38 CEST 2023
Invalid preference category path: org.eclipse.debug.ui.ConsolePreferencePage (bundle: org.eclipse.ui.console, page: org.eclipse.ui.internal.console.ansi.preferences.AnsiConsolePreferencePage)

and

eclipse.buildId=unknown
java.version=17.0.6
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64

org.jkiss.dbeaver.model
Error
Tue Apr 11 09:41:14 CEST 2023
Public Key Retrieval is not allowed

java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:827)
at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:447)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:237)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$1(JDBCDataSource.java:212)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$0(JDBCDataSource.java:225)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:244)
at org.jkiss.dbeaver.ext.mysql.model.MySQLDataSource.openConnection(MySQLDataSource.java:453)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:103)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:102)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.(JDBCRemoteInstance.java:61)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.initializeRemoteInstance(JDBCDataSource.java:130)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.(JDBCDataSource.java:108)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.(JDBCDataSource.java:99)
at org.jkiss.dbeaver.ext.mysql.model.MySQLDataSource.(MySQLDataSource.java:97)
at org.jkiss.dbeaver.ext.mysql.model.MySQLDataSource.(MySQLDataSource.java:92)
at org.jkiss.dbeaver.ext.mysql.MySQLDataSourceProvider.openDataSource(MySQLDataSourceProvider.java:148)
at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1191)
at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:1056)
at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:70)
at org.jkiss.dbeaver.runtime.jobs.ConnectionTestJob.run(ConnectionTestJob.java:103)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Я использую DBeaver для просмотра базы данных SQL в MySQL 8+.

Все работает, но иногда, открывая DBeaver, появляется следующее сообщение об ошибке:

Public Key Retrieval is not allowed

И тогда DBeaver не может подключиться к MySQL.

Чтобы решить эту проблему, мне нужно перенастроить MySQL.

Есть ли самый простой способ решить эту проблему?

2020-05-12 13:24

4
ответа

Решение

Вы пытались явно разрешить получение открытого ключа в DBeaver? В настройках подключения на вкладке SSL вы можете найти его

Это в случае, если вы используете SSL, в противном случае на том же экране вы можете отключить SSL, сняв флажки «использовать SSL» и «требовать SSL».

2020-05-16 09:37

Измените настройки на Dbeaver:

  1. Щелкните правой кнопкой мыши ваше соединение и выберите «Редактировать соединение».
  2. На экране «Настройки подключения» (главный экран) нажмите «Изменить настройки драйвера».
  3. Щелкните «Свойства соединения».
  4. Щелкните правой кнопкой мыши область «Свойства пользователя» и выберите «Добавить новое свойство».
  5. Добавьте два свойства:useSSL и allowPublicKeyRetrieval.
  6. Установите для них значения «ложь» и «истина», дважды щелкнув столбец «значение».
  7. Сохраните и проверьте соединение.

Надеюсь, это сработает!

2020-05-21 20:02

Изменить соединение

нажмите вторую вкладку «Свойства драйвера»

Изменить свойство allowPublicKeyRetrieval = True

Настройки подключения / Свойства драйвера:



08 мар ’21 в 21:00
2021-03-08 21:00

2021-03-08 21:00

Решение Ratish Bansal у меня работает на MacOS Mojave, и после этого я всегда получаю ошибку часового пояса. Решение для этого — установить мой местный часовой пояс вconnection settings:

2020-06-03 01:31

Smart way of Technology

Worked in Database technology for fixed the issues faced in daily activities in Oracle, MS SQL Server, MySQL, MariaDB etc.

Public Key Retrieval is not allowed error during MySQL connectivity with DBeaver

During Connectivity with DBeaver, we are getting the error Public Key Retrieval is not allowed.

We check the connection setting and edit the following property in Connection Setting:

allowPublicKeyRetrieval = TRUE

Sign in to follow this  

Followers
0

Perpetual Newbie


By
Perpetual Newbie, November 17, 2018 in General discussions

Recommended Posts

Perpetual Newbie
  

1


Perpetual Newbie

Posted November 17, 2018

Can’t connect to MySQL with DBeaver. Error:

Public Key Retrieval is not allowed

How to fix?

Share this post


Link to post
Share on other sites

C.M.
  

15


C.M.

Posted November 17, 2018

Add option allowPublicKeyRetrieval with vaule true in MySQL driver settings.

image.png.29f8f371829b899d882a544e0cd3ec09.png



  • Like


    1



  • Thanks


    1

Share this post


Link to post
Share on other sites

Perpetual Newbie
  

1


Perpetual Newbie

Posted December 4, 2019

Wow, that simple? 👀

It works now! Thanks for your help again 😊

Share this post


Link to post
Share on other sites

Everlasting Summer
  

4


Everlasting Summer

Posted August 14, 2021

17.11.2018 в 16:27, C.M. сказал:

Add option allowPublicKeyRetrieval with vaule true in MySQL driver settings.

image.png.29f8f371829b899d882a544e0cd3ec09.png

Thank you. It worked 👍

Share this post


Link to post
Share on other sites

Sign in to follow this  

Followers
0

Go To Topic Listing


Понравилась статья? Поделить с друзьями:
  • Dbd код ошибки 500
  • Dbd код ошибки 30005
  • Dbd shipping ошибка
  • Dbconn php вывод ошибок
  • Dayz battle eye ошибка