Not able to connect to postgresql server

So I'm having trouble connecting my postgresql db server. I'm relatively new to Ubuntu, this is a brand new computer.

My db name, username and password are all correct as per my Django settings. I hope I don't have to edit my pg_hba.conf file.

I had similar issues regarding this with Fedora, but I didn't think I would have this problem with Ubuntu. I did in fact create a new database via the linux terminal.

I'm also in my virtual environment. I even tried opening the psql shell and got more warnings. Here is the complete trackeback error after running python manage.py makemigrations and psql. FYI the name for my Ubuntu system is corey-james

  show_sunset_warning()
/home/corey-james/Arborhub/arborhubenv/lib/python3.12/site-packages/django/core/management/commands/makemigrations.py:160: RuntimeWarning: Got an error checking a consistent migration history performed for database connection 'default': connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL:  password authentication failed for user "cortec"
connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL:  password authentication failed for user "cortec"

  warnings.warn(
No changes detected
(arborhubenv) corey-james@corey-james-HP-Laptop-14-dq0xxx:~/Arborhub/MyProject$ psql
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "corey-james" does not exist
(arborhubenv) corey-james@corey-james-HP-Laptop-14-dq0xxx:~/Arborhub/MyProject$
Back to Top