Answer the question
In order to leave comments, you need to log in
Why am I getting django.db.utils.InternalError: (1049, "Unknown database 'db'")?
I have this:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': os.path.join(BASE_DIR, 'mydb'),
'USER': 'root',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '3306',
}
}
django.db.utils.InternalError: (1049, "Unknown database 'mydb'") ?
Answer the question
In order to leave comments, you need to log in
In "NAME" you write the name of the database that you created in the MySQL server.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'mydb',
'USER': 'root',
'PASSWORD': 'password',
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question