Forums

psql: could not connect to server: Connection refused

Hello,

I'm having a hard time trying to put my web app online. I just bought a hacker account with a postgresql server but I can't connect to it, even from the bash. When I'm using the command psql -h jumertz-30.postgres.eu.pythonanywhere-services.com -d site_web -U jumertz --port=10667, I get the following error : psql: could not connect to server: Connection refused Is the server running on host "jumertz-30.postgres.eu.pythonanywhere-services.com" (10.0.0.113) and accepting TCP/IP connections on port 10667? It looks like the server is not active but I don't understand how I can activate it.

Thank you in advance for your help !

It looks like you're not using the correct port number. It is shown on your Databases tab.

You are right, I don't know why I was using 10667. Thanks for the help and sorry for the inconvenience.