By karlritchie
I’m getting an operational errror in a section of my website FATAL: password authentication failed for user “myprojectdbuser” Request Method: GET Request URL: http://178.62.41.209/blog/ Django Version: 1.8.7 Exception Type: OperationalError Exception Value:
FATAL: password authentication failed for user “myprojectdbuser” FATAL: password authentication failed for user “myprojectdbuser”
Exception Location: /usr/lib/python2.7/dist-packages/psycopg2/init.py in connect, line 164 Python Executable: /usr/bin/python Python Version: 2.7.12 Python Path:
[‘/home/django/django_project’, ‘/home/django/django_project’, ‘/usr/bin’, ‘/usr/lib/python2.7’, ‘/usr/lib/python2.7/plat-x86_64-linux-gnu’, ‘/usr/lib/python2.7/lib-tk’, ‘/usr/lib/python2.7/lib-old’, ‘/usr/lib/python2.7/lib-dynload’, ‘/usr/local/lib/python2.7/dist-packages’, ‘/usr/lib/python2.7/dist-packages’]
Server time: Fri, 12 Jan 2018 08:40:01 +0000
Error during template rendering
In template /home/django/django_project/blog/templates/blog/blog.html, error at line 3 FATAL: password authentication failed for user “myprojectdbuser” FATAL: password authentication failed for user “myprojectdbuser” 1 {% extends “personal/header.html” %} 2 {% block content %} 3
{% for post in object_list %}
4 <h5>{{ post.date|date:“Y-m-d” }}<a href=“/blog/{{post.id}}”> {{ post.title }}</a></h5> 5 {% endfor %} 6 {% endblock %} 7
This might be due to the superuser but when I try to create a superuser on the server I get the authentication failed error.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
It looks like either your database user password is incorrect, or the username itself is not correct.
You would need to follow the steps here on how to create a Postgres user for your Django app:
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.