Forums

Problem migrating the database to MySQL - Django proyect

Hello everyone!

I am trying to configure a MySQL database in an existing Django proyect that is already working. I followed all the steps in this site but the result when I type in the console (in my virtual enviroment) "python manage.py migrate" is always:

1044, "Access denied for user 'DianaLaura'@'%' to database ' DianaLaura$intranet'"

I have read in another similar topics but nothing helped.

I have prepared the settings as follows:

DATABASES = {
    'default': {
    'ENGINE': 'django.db.backends.mysql',
    'NAME': ' DianaLaura$intranet',
    'USER': 'DianaLaura',
    'PASSWORD': '*******',
    'HOST': 'DianaLaura.mysql.pythonanywhere-services.com',
    }
}

Is there a mistake or anything new that I am missing?? I am new on this so I appreciate your help.

Thanks!!!!!!

Diana

Where do you get your MySQL password from?

I got the password when creating the database in "Databases" section in PA. One of the things I tried is modifying the password but it did not work. Is there any special condition for the password?? Thanks! Diana

There are no specific requirements for a MySQL password, but special characters might be an issue if you do not escape them correctly in your Python code.