Create a database migration file or create a table error: django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.
Django2.2.10 can no longer connect to the MySQL database according to the old method before and will report an error.
There are many solutions on the Internet, some of which I tried without success, I recommend this
solution without modifying the source code. Solution :
Step 1: Use
pip freeze > requirements.txt
Generate requirements.txt in the project directory
Step 2: Install the specified mysqlcilent version inside
pip install mysqlclient==1.4.6
Step 3: Delete the so-called "disguised" two lines of code in the previous version.
As shown above, comment out.
Then no error will be reported, and it is not recommended to modify the source code.
python manage.py migrate
Thanks for the contribution of this blogger [https://blog.csdn.net/KissTooTrue/article/details/104433377]