paycopg2.OperationalError: connection to server at “localhost” (:1), port 5432 failed: Connect
Is the server running on that host and accepting TCP/IP connections? connection to server at “localhost” (127.0.0.1), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections
I’m trying to deploy my backend and I keep getting this error
It looks like your code is trying to connect to a Postgres DB on localhost/
127.0.0.1, in most cases this won’t be correct.
You’ll need to ensure your code is using the connection credentials provided by the Postgres instance you have chosen to use, whether that’s Render Postgres or another provider.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.