Reputation: 1648
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:
Upvotes: 0
Views: 216
Reputation: 2357
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': '',
}
}
Upvotes: 1