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 run the server 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:
django.db.utils.OperationalError: FATAL: password authentication failed for user "Youssef"
Here's the DATABASE part in the settings.py file:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'Boards_django',
'USER': 'Youssef',
'PASSWORD': '000000',
'HOST': 'localhost',
'PORT': '5432',
}
}
BTW, the database is recognized by the PgAdmin4:
Any idea what should I do???
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:
django.db.utils.OperationalError: FATAL: password authentication failed for user "Youssef"
Here's the data in the pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
# "local" 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

pg_hba.conf, what ispassword_encryption, what is the message in the PostgreSQL log.password_encryption??? and the PostgreSQL log??? Sorry, I'm new to Django 😅😅 @LaurenzAlbe