can not connect to the pg database hosting on Heroku

10,804

You need to be running one of Heroku's production databases or their new development 9.1 database to be able to connect to the DB from outside;

https://devcenter.heroku.com/articles/heroku-postgresql https://postgres.heroku.com/blog/past/2012/4/26/heroku_postgres_development_plan/

Share:
10,804
pierrotlefou
Author by

pierrotlefou

Software Developer

Updated on June 04, 2022

Comments

  • pierrotlefou
    pierrotlefou almost 2 years

    When try connecting to the PG database I got following error:

    $ heroku pg:psql --app rf1
    psql: could not connect to server: Operation timed out Is the server running on host "ec2-184-73-161-119.compute-1.amazonaws.com" and accepting TCP/IP connections on port 5432?

    How could I fix it? P.s: I am running on a OS X environment and have local pg installed.

    Update:

    heroku pg:info --app rf1
    === SHARED_DATABASE (DATABASE_URL)
    Data Size: 312k
    
  • pierrotlefou
    pierrotlefou almost 12 years
    Thanks. I switched to the dev plan and it worked as expected!