Having recently upgraded a Django project from 2.x to 3.x, I noticed that the mysql.connector.django
backend (from mysql-connector-python
) no longer works. The last version of Django that it works with is 2.2.11. It breaks with 3.0. I am using mysql-connector-python==8.0.19
.
When running manage.py runserver
, the following error occurs:
django.core.exceptions.ImproperlyConfigured: 'mysql.connector.django' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
'mysql', 'oracle', 'postgresql', 'sqlite3'
I am aware that this is not an official Django backend but I have to use it on this project for reasons beyond my control.
I am 80% sure this is an issue with the library but I'm just looking to see if there is anything that can be done to resolve it beyond waiting for an update.
UPDATE:
mysql.connector.django
now works with Django 3+.
For Django 3.0
and Django 3.1
I managed to have it working with mysql-connector-python 8.0.22
. See this https://dev.mysql.com/doc/relnotes/connector-python/en/news-8-0-22.html.
Connector/Python still supports Python 2.7, which was dropped by Django 3. We are currently working on adding support for Django 3, stay tunned.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With