Connect to a heroku database with pgadmin

匿名 (未验证) 提交于 2019-12-03 02:17:01

问题:

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:credentials to connect de DB using pgadmin, I obtain:

An error has occurred:

Error connecting to the server: FATAL: permission denied for database "postgres" DETAIL: User does not have CONNECT privilege.

Any guide on how to achieve the connection?

回答1:

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.

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.



回答2:

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



回答3:

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.



回答4:

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



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!