Connect to a heroku database with pgadmin Connect to a heroku database with pgadmin postgresql postgresql

Connect to a heroku database with pgadmin


Open the "Properties" of the Heroku server in pgAdminIII and change the "Maintenance DB" value to be the name of the database you want to connect to.

pgAdmin III - New Server Registration

The default setup is suitable for DBAs et al who can connect to any database on the server, but apparently that isn't true in your case.


After you change the Maintenance DB name as suggested by araqnid's answer above, you should also add your database to the DB restrictions field because without this you will see thousands of databases and you may not be able to find yours in the list if the list is too long.

More details here - How to hide databases that I am not allowed to access


This is for pgAdmin 4

In order to connect pgAdmin to your database (postgres instance in Heroku), do the following:

  1. Login to Heroku, and select the application in which you have the databaseenter image description here

  2. Select the Resources tab and then click on "Heroku Postgres Ad-on" (see below). This will open up a new tab.enter image description here

  3. Select the Settings tab and then click on "View Credentials..." (see below)enter image description here

You will get the following information that you will use in pgAdmin:

enter image description here

  1. Go to pgAdmin, and create a new server

enter image description here

  1. In the General tab, give a useful nameenter image description here

  2. In the Connection tab, fill the info you got at Herokuenter image description here

  3. In order to avoid seeing thousands of databases, you need to add your database name to DB restriction in the Advanced tab (see below)enter image description here