Django 3.x错误:"mysql.connector.django"不是可用的数据库后端 [英] Django 3.x error: 'mysql.connector.django' isn't an available database backend

查看:45
本文介绍了Django 3.x错误:"mysql.connector.django"不是可用的数据库后端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近将Django项目从2.x升级到3.x,我注意到 mysql.connector.django 后端(来自 mysql-connector-python )不再有效.可以使用的Django的最新版本是2.2.11.它打破了3.0.我正在使用 mysql-connector-python == 8.0.19 .

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.

运行 manage.py runserver 时,发生以下错误:

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'

我知道这不是官方的Django后端,但出于无法控制的原因,我必须在该项目中使用它.

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.

我有80%的肯定这是图书馆的问题,但我只是想看看是否有什么事情可以解决,而无需等待更新.

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.

推荐答案

Connector/Python仍支持Python 2.7,而Django 3已将其删除.我们目前正在努力添加对Django 3的支持,敬请期待.

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.

这篇关于Django 3.x错误:"mysql.connector.django"不是可用的数据库后端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆