Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6835315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:13:04+00:00 2026-05-26T23:13:04+00:00

OperationalError at /admin/ FATAL: Peer authentication failed for user myuser This is the error

  • 0
OperationalError at /admin/

FATAL:  Peer authentication failed for user "myuser"

This is the error I am receiving when I try to get to my Django admin site. I had been using MySQL database no problem. I am new to PostgreSQL, but decided to switch because the host I ultimately plan to use for this project does not have MySQL.

Therefore, I figured I could go through the process of installing PostgreSQL, run a syncdb and be all set.

Problem is that I cannot seem to get my app to connect to the database. I can login to PostgreSQL via command line or desktop app that I downloaded. Just not in the script.

Also, I can use manage.py shell to access the db just fine.

Any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:13:05+00:00Added an answer on May 26, 2026 at 11:13 pm

    I took a peek at the exception, noticed it had to do with my connection settings. Went back to settings.py, and saw I did not have a Host setup. Add localhost and voila.

    My settings.py did not have a HOST for MySQL database, but I needed to add one for PostgreSQL to work.

    In my case, I added localhost to the HOST setting and it worked.

    Here is the DATABASES section from my settings.py.

    DATABASES = { 
        'default': { 
            'ENGINE': 'django.db.backends.postgresql_psycopg2',
            'NAME': '<MYDATABASE>', 
            'USER': '<MYUSER>', 
            'PASSWORD': '<MYPASSWORD>', 
            'HOST': 'localhost', # the missing piece of the puzzle 
            'PORT': '', # optional, I don't need this since I'm using the standard port
        } 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting the error OperationalError: FATAL: sorry, too many clients already when using
I get the following error: sqlite3.OperationalError: table gallery_image has no column named filename Here
I get sqlite3.OperationalError: SQL logic error or missing database when I run an application
I got this error: OperationalError at / unable to open database file Things I've
The python manage.py syncdb command is giving me the following error: sqlite3.OperationalError: unable to
I am following the tutorial on the DJango site, which I previsouly did using
No idea why this error is popping up. Here are the models I created
I started getting: OperationalError at /admin/contact_us/contact_details/ (1054, Unknown column 'contact_us_contact_details.address_title' in 'field list') Request
mysql diplay an error OperationalError: (1025, Error on rename of './CMMS/#sql-c40_20a' to './CMMS/member' (errno:
Posted the model at http://pastebin.com/f609771cc getting error: (yes it's windows) File C:\Python25\lib\site-packages\MySQLdb\connections.py, line 35,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.