0

I want to make connection with my MySQL database which is deployed on Heroku. However, after setting parameters for database I am getting this error:

django.db.utils.OperationalError: (1044, "Access denied for user '*mu username*'@'%' to database '*name of my database*'")

In my settings.py :

DATABASES = {
'default': {  
    'ENGINE': 'django.db.backends.mysql',
    'NAME': '*name of my database*',
    'USER': '*my username*',
    'PASSWORD': '*my password*',
    'HOST': 'eu-cdbr-west-01.cleardb.com',
    'PORT': '3306',
}

}

Zaqa
  • 11
  • 2

1 Answers1

0

I'm not a big expert but in my case, an automatic PostgreSQL database is attached to the project when started. Also, DATABASE_URL is set as protected variable in your app and points to the PostgreSQL DB.

You can try to delete the add-on so the variable disappears and then create a new one: DATABASE_URL -> mysql://username:<password>@hostname:port/databasename

You can get some more info about and almost identical question here.

Navio1729
  • 9
  • 4