Presto DB Support. Password Prompt? Follow
I am attempting to connect to a local PrestoDB db using DataGrip but having some troubles.
My PrestoDB instance does not require a password but no matter what I do, DataGrip prompts for credentials.
- Downloaded the presto JDBC driver: presto-jdbc-329.jar
- Created a new driver in DataGrip using this file
- Created a new data source using this driver and URL of: jdbc:presto://localhost:8080?user=ivan
Is there a problem connecting to databases that do not require a password? If I add a blank password, I get the error:
'Authentication using username/password requires SSL to be enabled'
Also I have tried using the same driver in a simple java class and it works fine, connecting to the same presto instance.
Please sign in to leave a comment.
Please provide complete error message.
We have heuristic that show error message + password prompt if you have no password and connection have failed. That is because we can not tell if the failure is because of the missing password and do not want our users to go to the settings if does.
Just show us the message in that dialog
Yes, this fixes the problem, though it's interesting how DBeaver works with empty string as a password without any issues with the same driver.
Also, could you try to right-click on password input and invoke `Empty password` action, then apply and try to connect again?
Odd. it seems to be working now. Even when I create new connection it allows me to just fill in username and not put anything to password (or set it to empty). I just leave it empty and it works. btw, I'm using presto-jdbc-329 and not 0.242 as you are.
You can either go to the Advanced tab and add the property "SSL" and set it to "true" or change your url to jdbc:presto://localhost:8080?SSL=true&user=ivan
For more jdbc options refer to presto docs https://prestodb.io/docs/current/installation/jdbc.html
Greg Stearns specifying SSL=true isn't necessary in connection URL because it seems that DataGrip forces this as soon as define user for connection.
vasily chernov I'm having the same problem and JDBC options aren't helping. As same options (connection URL) works from DBeaver
This seems to be the problem on DataGrip side as it requires both "password=secret" and "SSL=true" parameters if "user" parameter is set. However, Presto driver requires user parameter to be set, event when it doesn't have SSL enabled and it doesn't require "password" parameter.
This is not the first time I'm having connection problems with DataGrip (which I pay for) and no connection problems with DBeaver which is free
The error message is:
"The specified database user/password combination is rejected: Authentication using username/password requires SSL to be enabled" and I'm presented with user/password prompt.
Note that Presto cluster is configured without SSL, which is the same as the data source. Also, Presto is configured without authentification, but it requires that there is something specified in the username field (anything will do), and not to specify anything in the password field.
Looks like using string
as a password will do the job. This is a quote from driver jar decompiled source (version 344):
It's kinda strange. I created an issue based on your description https://youtrack.jetbrains.com/issue/DBE-11805
I think I found out why sometimes it is not working.
When you configure a Trino database in Datagrip and you enter a non-empty username and you do not touch the password field at all, everything is working.
But when you enter any password, it breaks, and you can no longer connect (invalid username and password).
Delete key does not help. No set empty button exists in my IDEA.
The only solution is to enter the above-mentioned password - ***empty***.
Then everything is working again :-)
My setup: Ubuntu 21.10, IDEA 2022.1 from Snap.
It looks like JDBC driver issue. Could you contact vendor and report the issue?