Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

heroku pg:psql not working

Tags:

heroku

I tried to connect to the Postgres database for my app on heroku by running the command "heroku pg:psql" and got the following error message:

psql: could not connect to server: Connection timed out (0x0000274C/10060)
    Is the server running on host "URL.com"(IP address)  and accepting
    TCP/IP connections on port 5432?

I also tried to connect using Pgadmin and get the error:

Server doesn't listen. Is the server running on host "URL.com" (IP address) and accepting
    TCP/IP connections on port 5432?

Can anyone tell me how to fix these errors and correctly connect to my database. Thanks in advance!

like image 393
Long Wan Avatar asked Jan 22 '13 18:01

Long Wan


1 Answers

Try this:

heroku pg:psql DATABASE_URL
like image 59
Yoni Rabinovitch Avatar answered Jan 04 '23 13:01

Yoni Rabinovitch