[Django]-Connecting Django to Postgres: django.db.utils.OperationalError: FATAL: database "DATABASENAME" does not exist

4👍

I set the wrong port of the Database in the Django “settings.py”.

I was using 'PORT': '5432' instead of 'PORT': '5433'

SOLUTION:

  • Go to your Postgres app/icon/program
  • Click on “Server setting” and see which PORT the database POSTGRES is using
  • Be sure that the PORT the database is using is the same as the one you write in the “settings.py” of your Django project.

Leave a comment