DEV Community

Toni Oriol
Toni Oriol

Posted on • Originally published at Medium on

How to connect Datagrip (or any intellij IDE) with Heroku Postgres

[UPDATE Sept 2020]:

Extra sslmode=require needed for it to work.

[ORIGINAL]:

Heroku Postgres forces you to use SSL, but the connection isn’t signed with a well-known CA. To get this to work in DataGrip, you have to mess around with some JDBC settings. Here’s how to do it:

In the add connections dialog, enter the username, password, hostname, port, and database name. You’ll have to enter these manually, because DataGrip’s URL support only works with JDBC database URLs, not the more common Postgres URLs used by Heroku.

Next, click on the Advanced tab. Then find the ssl property and set it to true. Then find the sslfactory property and set it to org.postgresql.ssl.NonValidatingFactory.

You should be good to go!

Getting Jetbrains DataGrip to work with Heroku Postgres · Andy Fiedler

Top comments (0)