[Django] #28145: Django documention - MySQL database connector - PyMySQL for python 3 support

30 views
Skip to first unread message

Django

unread,
Apr 27, 2017, 4:28:53 PM4/27/17
to django-...@googlegroups.com
#28145: Django documention - MySQL database connector - PyMySQL for python 3
support
-----------------------------------------+------------------------
Reporter: kinganu | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: 1.11
Severity: Normal | Keywords: mysql
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Just wanted to notify to add documentation for MySQL python 3 support
there is a common package used called PyMySQL to connect with database.
Ive used successfully with flask applications, trying with django now.

pip install pymysql

more info here : http://stackoverflow.com/questions/34777755/how-to-
config-django-using-pymysql-as-driver

--
Ticket URL: <https://code.djangoproject.com/ticket/28145>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 27, 2017, 9:45:05 PM4/27/17
to django-...@googlegroups.com
#28145: Django documention - MySQL database connector - PyMySQL for python 3
support
-------------------------------+--------------------------------------

Reporter: kinganu | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: 1.11
Severity: Normal | Resolution:

Keywords: mysql | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Tim Graham):

We're recommending the
[https://docs.djangoproject.com/en/dev/ref/databases/#mysql-db-api-drivers
mysqlclient] MySQLdb fork. Is there a reason to prefer PyMySQL instead?

--
Ticket URL: <https://code.djangoproject.com/ticket/28145#comment:1>

Django

unread,
May 1, 2017, 7:40:13 AM5/1/17
to django-...@googlegroups.com
#28145: Django documention - MySQL database connector - PyMySQL for python 3
support
-------------------------------+--------------------------------------
Reporter: kinganu | Owner: nobody
Type: New feature | Status: closed
Component: Documentation | Version: 1.11
Severity: Normal | Resolution: needsinfo

Keywords: mysql | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => needsinfo


--
Ticket URL: <https://code.djangoproject.com/ticket/28145#comment:2>

Django

unread,
Sep 21, 2018, 8:36:17 AM9/21/18
to django-...@googlegroups.com
#28145: Django documention - MySQL database connector - PyMySQL for python 3
support
-------------------------------+--------------------------------------
Reporter: kinganu | Owner: nobody
Type: New feature | Status: closed
Component: Documentation | Version: 1.11
Severity: Normal | Resolution: needsinfo

Keywords: mysql | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by pojda):

Jumping into something old here, but I have to add some info: the
mysqlclient lib you recommend is a pain to install on Mac or Windows,
while **PyMysql works out of the box**.

I had to use the same workaround mentioned on that stackoverflow post -
which I don't like because I'm modifying Django's source and may cause
trouble when upgrading.


Cheers!

--
Ticket URL: <https://code.djangoproject.com/ticket/28145#comment:3>

Django

unread,
Nov 7, 2018, 3:05:36 AM11/7/18
to django-...@googlegroups.com
#28145: Django documention - MySQL database connector - PyMySQL for python 3
support
-------------------------------+--------------------------------------
Reporter: kinganu | Owner: nobody
Type: New feature | Status: closed
Component: Documentation | Version: 1.11
Severity: Normal | Resolution: needsinfo

Keywords: mysql | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Sergey Fedoseev):

* cc: Sergey Fedoseev (added)


Comment:

Replying to [comment:3 pojda]:

> I had to use the same workaround mentioned on that stackoverflow post -
which I don't like because I'm modifying Django's source and may cause
trouble when upgrading.

It looks like this workaround can be added to `settings.py` as well:
https://stackoverflow.com/questions/34777755/how-to-config-django-using-
pymysql-as-driver#comment92469445_34778155

--
Ticket URL: <https://code.djangoproject.com/ticket/28145#comment:4>

Django

unread,
Jul 24, 2019, 7:49:22 AM7/24/19
to django-...@googlegroups.com
#28145: Django documention - MySQL database connector - PyMySQL for python 3
support
-------------------------------+--------------------------------------
Reporter: kinganu | Owner: nobody
Type: New feature | Status: closed
Component: Documentation | Version: 1.11
Severity: Normal | Resolution: needsinfo

Keywords: mysql | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by andreymal):

Replying to [comment:1 Tim Graham]:


> Is there a reason to prefer PyMySQL instead?

There is a very important reason: mysqlclient is GPL-licensed. This makes
it impossible to create proprietary projects using MySQL. (I know it's not
AGPL and I'm not obliged to publish my backend code for everyone, but GPL
may still have other legal problems.)

In fact, I would really like the PyMySQL support to be full and official.

--
Ticket URL: <https://code.djangoproject.com/ticket/28145#comment:5>

Reply all
Reply to author
Forward
0 new messages