1. Background
Because you want to change the default database of Django to MySQL, the following error is reported when starting the project
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
2. Solution
From the above results, it can be seen that the corresponding module cannot be identified, so the corresponding module needs to be modified __ init__.Py file
import pymysql
pymysql.install_as_MySQLdb()
Just start the service again
Read More:
- [Solved] django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.Did you install mysqlclie
- [Solved] Django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17).
- [Solved] Python Project Error: django.core.exceptions.ImproperlyConfigured: WSGI application ‘WebTool.wsgi.application
- Django uses Mysql to report an error loading MySQL DB module: no module named ‘mysqldb’
- [Solved] Django project locally Open Error: importerror: couldn’t import Django
- [Solved] Django Configurate celery error: django.db.utils.DatabaseError
- [Solved] from django.core.cache import cache Error
- [Solved] Python Django error: error: (1146, “Table ‘mydb.django_session’ doesn’t exist”)
- Python: Django exception when executing migrate operation: django.db.utils.OperationalError: (1051, “Unknown table’xxx’”)
- MySQLdb._exceptions.ProgrammingError appears when scrapy crawls Weibo hot comments
- Django WSGI protocol application, based on wsgiref module DIY a web framework
- Django PythonConsole error: Requested setting DEFAULT_INDEX_TABLESPACE
- Django Issues: TypeError: “Settings” object is irreversible
- [Solved] Django backend processing Base64 file upload error
- [Solved] Django Error: Attributeerror: ‘wsgirequest’ object has no attribute ‘is_ajax ‘
- [Solved] Django backend error: Assertion failed: (NSViewIsCurrentlyBuildingLayerTreeForDisplay()
- [Solved] Django Access to the backend error: Invalid block tag on line 98: ‘trans‘, expected ‘elif , ‘else‘或‘ endif. Did you forget
- Django Error: ‘polls‘ is not a registered namespace
- [Solved] django AttributeError: ‘UserComment‘ object has no attribute ‘save‘