Opened 6 years ago

Closed 12 months ago

#12500 closed New feature (wontfix)

Support for MySQL Connector/Python

Reported by: geertjanvdk Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1
Severity: Normal Keywords: backend mysql myconnpy
Cc: wwbj2r68n2@…, markus.magnuson@…, cmawebsite@… Triage Stage: Someday/Maybe
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


This is a feature request/proposal for including MySQL Connector/Python, a pure Python database driver) support in Django. It will make it hopefully much easyier for people to get working with Django and MySQL on all platforms.

Attached you'll find the backend which is a patched agains Django 1.2 rev 12083. For now it works well.
We'll probably put some ideas/workaround found in the original MySQL backend, back in MySQL Connector/Python.

More information and download of MySQL Connector/Python here:

Attachments (1)

myconnpy.patch.gz (6.2 KB) - added by geertjanvdk 6 years ago.
Patch of a DB backend supporting MySQL Connector/Python

Download all attachments as: .zip

Change History (19)

Changed 6 years ago by geertjanvdk

Patch of a DB backend supporting MySQL Connector/Python

comment:1 Changed 6 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Someday/Maybe

Database backends should be first be maintained as external projects. Once you have demonstrated a long-term commitment to maintaining the external project, and you can demonstrate a non-trivial demand for your backend, we may consider introducing the backend into core.

comment:2 Changed 6 years ago by dulepov

  • Cc wwbj2r68n2@… added
  • Keywords myconnpy added

comment:3 Changed 5 years ago by mattmcc

  • Component changed from Uncategorized to Database layer (models, ORM)
  • Severity set to Normal
  • Type set to New feature

comment:4 Changed 4 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 4 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:6 Changed 3 years ago by aaugustin

  • Resolution set to wontfix
  • Status changed from new to closed

I'm not aware of "non-trivial demand" for this backend over the last three years. If I've missed it, please reopen.

comment:7 Changed 3 years ago by Daniel.Sears@…

One reason to consider this is that MySQLdb does not currently support Python 3.


comment:8 Changed 3 years ago by aaugustin

  • Resolution wontfix deleted
  • Status changed from closed to new

Hmm. In fact, I'm going to reopen this myself, for the reasons explained here:

comment:9 Changed 2 years ago by Daniel.Sears@…

This looks like a moot point now that Oracle is shipping their own Django back-end for MySQL:

comment:10 Changed 2 years ago by aaugustin

I still believe we should switch Django's built-in MySQL backend to MySQL Connector, because it’ll provide a better experience for MySQL users, especially under Python 3.

An external backend is less discoverable than a built-in one, all the more if it isn't even mentioned in the docs (we could fix that in the short term).

comment:11 Changed 2 years ago by anonymous

The latest releases of PyMySQL work with Django + Python 3.3. So if the backend changes, it would be nice if PyMySQL can remain compatible.

comment:12 Changed 22 months ago by timo

#22370 details a failing test with the connector (unclear to me if the problem is ours or theirs).

comment:13 Changed 21 months ago by giuliettamasina

Note that MySQL Connector from Oracle does not work with Django 1.7, due to the various TEST_* settings being deprecated. See ticket #22584 for more info on this.

(I have sent a bug report to Oracle as well.)

It might not even be a good idea to refer to this adapter in the 1.7 documentation, as is currently done here:

Until fixed on Oracle's side, following the documentation's advice for Python 3 will result in non-functioning tests.

comment:14 Changed 21 months ago by giuliettamasina

  • Cc markus.magnuson@… added

comment:15 Changed 20 months ago by methane

FYI, MySQL Connector/Python 1.2.2 GA has been released.

comment:16 Changed 18 months ago by CollinAnderson

  • Cc cmawebsite@… added

comment:17 Changed 12 months ago by collinanderson

I think we should close this now that we officially recommend mysqlclient. (mysqlclient works on Python 3.)

comment:18 Changed 12 months ago by timgraham

  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top