Password Authentication failed for user 'postgres' and default to windows user in PyCharm Professional

I have installed PostgreSQL on my windows PC. During installation I was asked a choose a password and a default user: postgres was assigned. I am trying to connect PostgreSQL to PyCharm for a Django project. I have changed my default database to PostgreSQL and tested the connection in the database. It worked perfectly. Below is the databases in the file.

'default': {
    'ENGINE': 'django.db.backends.postgresql',
    'NAME': 'btredb@localhost',
    'USER': 'postgres',
    'HOST': '',
    'PORT': '5432',



However, when I run runserver I get a password authentication failed for use 'cheap' which is my windows user. Why is PyCharm trying login to the windows user instead of the PostgreSQL user set in the databases settings? Can any one help to connect PostgreSQL to PyCharm professional?

Back to Top