0

I just started learning django. I change the following settings from setting.py because I want to use mysql not sqlite:

DATABASES = {
    'default' : {
        'ENGINE' : 'django.db.backend.mysql',
        'NAME' : 'newprj',
        'USER' : 'root',
        'PASSWORD' : 'abcd',
        'HOST' : 'localhost',
        'PORT' : ''
    }
}

then when I try this code python manage.py migrate on cmd. It throws an big error, I can't understand what is the problem, please help me solve it. This is the error: enter image description here

2
  • 1
    i think you should change backend to backends in Engine Commented Feb 28, 2019 at 8:55
  • 2
    better you copy and paste rather than take screenshots Commented Feb 28, 2019 at 8:55

1 Answer 1

1

You missed the s in django.db.backends.mysql

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',    #<---- You missed the s in backends
        'NAME': 'myproject',
        'USER': 'myprojectuser',
        'PASSWORD': 'password',
        'HOST': 'localhost',
        'PORT': '',
    }
}
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.