2

I'm totally new to django, I've just passed the tutorials, I try to use it with mysql, with setting my backend in settings file and put mysql user and password, But did not succeed. What else should I do?

1 Answer 1

1

You need to configure DATABASES setting in settings.py.

Here's an example configuration:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'mydb',
        'USER': 'myuser',
        'PASSWORD': 'mypassword',
        'HOST': '127.0.0.1',
        'PORT': '3306'
    }
}
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.