Connect to a heroku database with pgadmin

后端 未结 5 914
情深已故
情深已故 2020-11-30 16:40

I would like to manage my heroku database with pgadmin client. By now, I\'ve been doing this with psql. When I use data from heroku pg:creden

相关标签:
5条回答
  • 2020-11-30 17:13

    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.

    0 讨论(0)
  • 2020-11-30 17:13

    We require SSL for connections outside heroku. Please verify whether you're forcing SSL in your client.

    Edit:

    Answered more thoroughly here: https://dba.stackexchange.com/questions/21869/connecting-pgadmin3-to-postgres-on-heroku

    We don't allow connections to the postgres database, so be sure to set Maintenance DB to your database name, and be sure to use SSL.

    That should hopefully suffice.

    0 讨论(0)
  • 2020-11-30 17:15

    Change the Maintenance Database to the name of your Database, e.g. dva70000p0090. This should work.

    0 讨论(0)
  • 2020-11-30 17:23

    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 database

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

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

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

    1. Go to pgAdmin, and create a new server

    1. In the General tab, give a useful name

    2. In the Connection tab, fill the info you got at Heroku

    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)

    0 讨论(0)
  • 2020-11-30 17:28

    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

    0 讨论(0)
提交回复
热议问题