title: Postgresql - password authentication failed for user
body: <p>Well, I've been working on a project on Django, but a friend of mine was facing a problem so he sent me his project (The entire folder). Anyway, I tried to <em><strong>run the server</strong></em> but it didn't work. I tried to change the password and the username from the settings file, and when I tried to access the user, the username was changed (as the sql shell recognized it, I think ¯_(ツ)_/¯), but whenever I try to login with the password I wrote in the settings file it produces the following error:</p>
  <p><code>django.db.utils.OperationalError: FATAL:  password authentication failed for user &quot;Youssef&quot;</code></p>
  <p>Here's the <code>DATABASE</code> part in the settings.py file:</p>
  <pre><code>DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.postgresql',
          'NAME': 'Boards_django',
          'USER': 'Youssef',
          'PASSWORD': '000000',
          'HOST': 'localhost',
          'PORT': '5432',
      }
  }
  </code></pre>
  <p>BTW, the database is recognized by the PgAdmin4:</p>
  <p><a href="https://i.stack.imgur.com/1Btgt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Btgt.png" alt="enter image description here" /></a></p>
  <p>Any idea what should I do???</p>
  <p>Side note: I can't access the user, hence I'm not able to use any of the commands of postgresql
  Also, when I try to run the server or make anything on the database from VS Code, It raises the following error:</p>
  <p><code>django.db.utils.OperationalError: FATAL:  password authentication failed for user &quot;Youssef&quot;</code></p>
  <p>Here's the data in the <code>pg_hba.conf</code></p>
  <pre><code># TYPE  DATABASE        USER            ADDRESS                 METHOD
  
  # &quot;local&quot; is for Unix domain socket connections only
  local   all             all                                     scram-sha-256
  # IPv4 local connections:
  host    all             all             127.0.0.1/32            scram-sha-256
  # IPv6 local connections:
  host    all             all             ::1/128                 scram-sha-256
  # Allow replication connections from localhost, by a user with the
  # replication privilege.
  local   replication     all                                     scram-sha-256
  host    replication     all             127.0.0.1/32            scram-sha-256
  host    replication     all             ::1/128                 scram-sha-256
  </code></pre>