SSL connection to postgres

Completed

I had problems connecting to postgres with SSL.  After looking into JDBC docs, I found the answer, and am sharing for anyone else who may run into these issues.  The answer is modifying the JDBC URL, as apparently jdbc support for SSL is still a little lacking.  

 Try:

 jdbc:postgresql://<hostname>:<port>/<database>?sslmode=require

That should do the trick

5 comments

Thanks - I got distracted by the SSL tab

0

Sorry, could you point out where I can modify the JDBC URL? The current UI I have is like this:

which doesn't seem to have an entry to allow me to modify the URL directly... Maybe I'm not looking at the right place.

0

You're missing key window elements such as the URL input box.  My pycharm has a url input box, so i can't tell you where to put it for your version/os.  However, when creating a new data source you could choose 'Data source from URL' and see how that works.

0

Thanks for the hint. The URL input box appears when I choose "Custom" instead of "PostgreSQL" in the dropdown menu to create a new data source. If one chooses "PostgreSQL" it seems to hide the URL input box and uses preset values.

0

Thank you, this worked for me!

0

Please sign in to leave a comment.