如何连接到我的heroku共享数据库以获取postgresql?

时间:2012-05-21 19:58:38

标签: postgresql heroku

我从heroku配置中拉出了SHARED_DATABASE_URL

SHARED_DATABASE_URL => postgres://username:xxxx@host.com/db_name

我正在使用pgAdmin尝试连接到它,但它会继续超时。我需要指定一个端口吗?我错过了什么?

3 个答案:

答案 0 :(得分:18)

您可以使用此命令连接到psql。

heroku pg:psql

答案 1 :(得分:3)

如果您愿意更改为postgres 9.1,您可以使用新推出的开发数据库,​​该数据库允许通过普通的postgres工具进行连接。阅读更多https://postgres.heroku.com/blog/past/2012/4/26/heroku_postgres_development_plan/

答案 2 :(得分:0)

您无法使用psql,pgadmin等访问共享数据库。

  

Heroku为您提供了在共享或专用数据库包上运行的选择。共享计划适用于开发和登台应用程序。它运行Postgres 8.3。专用计划适用于生产规模应用。此外,专用数据库提供了许多优势,包括直接访问(通过psql或任何本地postgres库),存储过程和Postgres 9支持。 [source]