The django4 version prompts django.db.utils.NotSupportedError: MySQL 8 or later is required (found 5.7.26)
When I was learning django recently, I got the following error when executing python manage.py migrate: django.db.utils.NotSupportedError: MySQL 8 or later is required (found 5.7.26).
According to the information, the local mysql version is relatively low. After searching on Baidu, I found that Django 3.2 and higher require MySQL 8.0.25 or higher. My local mysql version is 5.7.26. But what if I don’t want to pretend anymore? Can I comment out the mysql version check?
- Enter python at the cmd command line
- Import django django to view the installation path of django
You can see that my directory is D:\python\Lib\site-packages\django. The complete directory is: D:\python\Lib\site-packages\django\db\backends\base. Open base.py in the base directory and find it. self.check_database_version_supported() and comment it out
Just run python manage.py migrate again
There are more tables in the database that can be viewed
As for what database problems I will encounter in the subsequent development, it is still unknown. I am just learning it now, so I will record it here.