SSL connection working in MySQL Workbench, but not in DBeaver
Asked Answered
D

6

9

EDIT for present day readers

This was a bug in an old version of DBeaver that was subsequently fixed.


I am getting an 'access denied' error trying to connect to a Google Cloud SQL MySQL instance with SSL in DBeaver.

I am able to:

  • connect to the server with the same SSL credentials in MySQL Workbench
  • connect without SSL credentials (through user name / password) in DBeaver.

Any suggestions why this might be?

Dolley answered 15/9, 2016 at 14:53 Comment(2)
This link explain how to do it. dbeaver.jkiss.org/2011/05/16/dbeaver-external-database-hostingTypesetter
Please reread my question. I am able to connect to Google Cloud SQL, it is just the ssl connection I'm having trouble with, and that page doesn't even mention ssl.Dolley
O
14

You can add connection with SSL support, at least in latest version for today (5.1). Create connection as usual, then skip testing and go to next step, then on SSL tab select "Require SSL" and unselect other checkboxes if selected, then test the connection. enter image description here

Orbicular answered 9/6, 2018 at 7:40 Comment(1)
Yes it was a bug in DBeaver which got fixedDolley
P
7

In 'Connection Settings' navigate to 'Driver Properties' check whether the 'useSSL' value is 'true' or 'false'. If 'false' make it 'true' and finish.

If value is 'true' first make it 'false' and again change value to 'true'. Then try to connect to databse. It should be success. Most of time that useSSL value not getting correctly by json file. Hence this will update it again.

enter image description here

Photooffset answered 20/1, 2023 at 10:10 Comment(0)
S
2

in dbeaver the ssl connection configuration is available but it is not working and it is not implemented, it took me a day to find out that this is because of dbeaver bug. If you need to connect through ssl to Postgres, you can use 'DataGrip' instead. As mentioned here: https://dbeaver.io/forum/viewtopic.php?f=2&t=1921 'Currently DBeaver doesn't support SSL connections out of the box. You could try to configure it manually if you are familiar with Java (instructions are at https://jdbc.postgresql.org/documentati ... lient.html).

Easy SSL support is in TODO and will be added in one of next versions.'

Simone answered 10/10, 2019 at 22:59 Comment(0)
S
1

For those who where struggling to connect, the way I resolved this was by setting allowPublicKeyRetrieval = trueenter image description here

Strongarm answered 4/8, 2023 at 5:8 Comment(0)
D
0

I get to do access database in DBeaver updating only useSSL = true in Driver Properties. See the picture:

DBeaver - Driver Properties

Denude answered 13/1, 2022 at 17:4 Comment(0)
P
0

Verify if the useSSL property is set to TRUE in data-sources.json. In windows its path is path-to-user/AppData\Roaming\DBeaverData\workspace6\General\.dbeaver\data-sources.json.

I had a similar issue. I am using DBeaver version Version 22.1.0.202206051253. I noticed even though the driver properties would show useSSL=true, it was not set.

As a result, it throws Access denied for user xxxxxx-XXXXX'@'XXX:XX:X:X' (using password: YES).

Pothouse answered 20/6, 2022 at 21:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.