My settings are local all @authmethodlocal@.
It's like I can't get into my user "postgres" or "ladonna".
I was running python3 manage.py runserver.
local host, 5432, etc are default.
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/psycopg2/__init__.py", line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: FATAL: password authentication failed for user "postgres"
The user postgres has no DB password by default. So, Check the file /etc/postgresql/10/main/pg_hba.conf: And change it to
local all postgres peer
Or Inside the psql shell you can set the password for user postgres
ALTER USER postgres PASSWORD 'yourPassword';
After setting password, add password in django settings for user postgres.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With