-
Notifications
You must be signed in to change notification settings - Fork 9
Description
When I try to execute step:
python manage.py db upgrade
I get this error:
OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
Restart postgresql according to http://breanneboland.com/blog/2015/08/13/python-with-flask-and-postgresql-is-the-server-running-on-host-localhost-127-0-0-1-and-accepting-tcpip-connections-on-port-5432/ and some others solutions like this doesn't help.
More than that, sometimes i get this:
OperationalError: (psycopg2.OperationalError) FATAL: password authentication failed for user "postgres"
FATAL: password authentication failed for user "postgres"
I tried to change user or change authentication from "peer" to "trust" but it doesn't make sense.
Please, could anyone help me? Any ideas how to fix it?