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
You should be good to go!