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',
}

}

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.