After changing the data configuration in the setting file of the project:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'cesi_DB', #Your database name 'USER': 'sheng', # your database username 'PASSWORD': 'xxoo', # your database password 'HOST': '10.0.0.11', # your database host, leave blank to default to localhost 'PORT': '3306', # your database port } }
Error Message:
'Did you install mysqlclient or MySQL-python?' % e django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named 'MySQLdb'. Did you install mysqlclient or MySQL-python?
Solution:
The engine that needs to change the database:
MYsqlDB ==》pymysql
In application (app01)__init__Add to the document:
import pymysql pymysql.install_as_MySQLdb()
Similar Posts:
- [Solved] django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. Did you install mysqlclient?
- [Solved] Django Error: Did you install mysqlclient?
- How to Solve Django Error: No module named ‘MySQLdb’
- Django: How to Solve Using Pymysql Error
- django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named ‘M…
- [Solved] peewee error: ImportError: No module named ‘MySQLdb’;pymysql error: from . import connections # noqa: E402
- [Solved] ModuleNotFoundError: No module named ‘MySQLdb’
- MySQL Python error installed in pyenv 2.7 environment
- python mac install MySQLdb ModuleNotFoundError No module named ‘ConfigParser’
- Error in Python compilation on MAC no module named mysqldb