Sunday, June 09, 2013

Connecting DbVisualizer to Heroku PostgreSQL database

Just a quick note on how to connect DbVisualizer to a Heroku PostgreSQL database. The trick is to get the SSL stuff to work, as DbVisualizer needs to be told to use a SSL factory (via the sslfactory driver property). I used the 'org.postgresql.ssl.NonValidatingFactory' SSL factory. I set this property and the ssl property (to true) in the Properties tab of the connection information. The rest of the connection information you need to get from Heroku, in particular the Heroku database configuration. Go to your Heroku dashboard, drill into your app of interest and click on the Heroku Postgres link (mine was labelled "Heroku Postgres Dev"). This will take you to the herokupostgres setting for your application. Click on the bi-directional arrows icon (Connection Settings) and you can find your connection setting there. I used the JDBC properties and filled out the Server Info settings format. This format seems to work better in DbVisualizer. Also allows you to ping the database server.

10 comments:

  1. Thanks! Worked perfectly (when I worked out how to edit the properties correctly.)

    ReplyDelete
  2. Hey Chris - you da man. Thanks for the tip!

    ReplyDelete
  3. It works! Thanks man.

    ReplyDelete
  4. Three years after writing this post and it is still helping! Thanks for the info!

    ReplyDelete
  5. Man - thanks a ton. Saved me hours of head-banging!

    ReplyDelete
  6. Worked for me. Thanks!

    ReplyDelete
  7. I know it's four years later - but this just saved me so many hours of trying to figure this out!! Thank you!

    ReplyDelete
  8. April 2017 - and this provided such a quick solution - thanks a lot!

    ReplyDelete