Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#23446 closed New feature (fixed)

mysqldb1 is no longer maintained and should not be recommended

Reported by: frewsxcv Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: frewsxcv, django@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by frewsxcv)

Currently, the documentation recommends mysqldb1. Here is why this recommendation is hurting the community, especially new users using MySQL with Django:

  • mysqldb1 is not compatible with Python 3
  • mysqldb1 has not had a commit since November 2013 (besides one tox commit from January 2014).
  • mysqldb1's author, farcepest, is not addressing any of the GitHub issues (and is inactive on GitHub in general)
  • the latest version of mysqldb1, 1.2.5 has a regression from its previous version 1 2 and it has not been addressed

In an attempt to solve this dilemma, I propose we stop recommending it as a MySQL driver in the documentation.

In replace of it, I would like to recommend a fork called mysqlclient. A diff between mysqlclient and mysqldb1 can be found here. Some of the benefits of mysqlclient over mysqldb1:

  • mysqlclient supports Python 2.7 and Python 3.x (same as Django)
  • mysqlclient is authored by the same team that authored PyMySQL and much more active

I've used the library for a couple months now and have not run into any issues. If others agree, I would be happy to write the copy in the documentation to support this change.

Change History (11)

comment:1 Changed 5 years ago by frewsxcv

Description: modified (diff)

comment:2 Changed 5 years ago by frewsxcv

Description: modified (diff)

comment:3 Changed 5 years ago by Tim Graham

There's a thread related to this on the DevelopersMailingList: https://groups.google.com/d/topic/django-developers/n-TI8mBcegE/discussion

Unfortunately, it hasn't gotten many replies. Perhaps you could chime in there as that's the place where we'd make this sort of decision.

comment:4 Changed 5 years ago by Tim Graham

Component: DocumentationDatabase layer (models, ORM)
Triage Stage: UnreviewedAccepted
Type: BugNew feature

There are some test failures as noted on the mailing list thread that need to be fixed before we can switch.

comment:5 Changed 5 years ago by Tim Graham

Test failures are fixed with mysqlclient 1.3.3. As noted on the thread, we'll need to drop Python 3.2/MySQL support since the client doesn't support it. I wonder if mysqlclient has added support for binary data? If so, we can drop the supports_binary_field flag (unless it might be needed by 3rd party backends). There is also some logic about the minimal MySQLdb version in django.db.backends.mysql.base which will need to be updated. And of course documentation updates are required.

comment:6 Changed 5 years ago by frewsxcv

Cc: frewsxcv added

comment:7 Changed 5 years ago by Chris Streeter

Cc: django@… added

comment:9 Changed 5 years ago by Tim Graham

Triage Stage: AcceptedReady for checkin

comment:10 Changed 5 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: newclosed

In 7f089ac2e3e6a7f4b2b41085a37d35e074fad805:

Fixed #23446 -- Officially recommended mysqlclient as MySQL driver

Thanks Corey Farwell for the report and Tim Graham for the review.
Thanks also to Inada Naoki for creating and maintaining mysqlclient.

comment:11 Changed 5 years ago by Claude Paroz <claude@…>

In b42930e4b7f344256cf5625d8b26c7626a354244:

[1.7.x] Fixed #23446 -- Officially recommended mysqlclient as MySQL driver

Thanks Corey Farwell for the report and Tim Graham for the review.
Thanks also to Inada Naoki for creating and maintaining mysqlclient.
Backport of 7f089ac2e3 from master.

Note: See TracTickets for help on using tickets.
Back to Top