Reputation: 57
I use this tutorial with Python 3.5, Django 1.9, Linux Mint and PostgreSQL 9.3. But when I try "manage.py migrate" I have an error:
django.db.utils.OperationalError: FATAL: password authentication failed for user "myprojectuser"
My database settings:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'myproject',
'USER': 'myprojectuser',
'PASSWORD': 'xxxxx',
'HOST': 'localhost',
'PORT': '',
}}
Upvotes: 2
Views: 2622
Reputation: 3699
its fairly self-explanatory, are the database password setting and the postgres user setting equal?
open a terminal and sudo -i -u postgres psql
then do alter user myprojectuser with encrypted password xxxxx;
set password equal to the value of password in your settings dict
'default': {
'PASSWORD': 'xxxxx',
}
Upvotes: 1