Heroku PostgreSQL and DBVisualiser connection using SSL

I occasionally use Heroku to deploy webapps on the cloud combined with a Postgres database to store my relational data

I recently found a multi-platform polyglot SQL client that I could use with my MAC, this product is called DbVisualiser

However since Heroku requires an SSL security on external connections after providing the usual database connection properties (url, username, password) when I tried to connect through DbVisualiser I was getting the error message :

FATAL: no pg_hba.conf entry for host "86.200.9.63", user "u4b1uljsil33m2", database "de9td8cv06p4se", SSL off

After playing a bit with the different options and reading the Postgres JDBC driver over here I found out that you can provide an Non Validating SSL factory in the connection properties to satisfy Heroku's SSL requirements

In order to configure the SSL properties in DbVisualiser you need to edit the following SSL properties in the Properties tab :

  • SSL : true
  • sslfactory : org.postgresql.ssl.NonValidatingFactory

By providing these 2 properties you should be able to connect to your Heroku database without any problems

Popular posts from this blog

Multi-hop ssh tunnel - howto : Creating a SSH tunnel with port forwarding between multiple hosts

Spring boot and spring data jpa tutorial - A sample application using spring 4.0 spring boot and JPA (part 2/2)

Scala : easily load an parse configuration files