Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#28145 closed New feature (needsinfo)

Django documention - MySQL database connector - PyMySQL for python 3 support

Reported by: kinganu Owned by: nobody
Component: Documentation Version: 1.11
Severity: Normal Keywords: mysql
Cc: Sergey Fedoseev Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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

Change History (5)

comment:1 by Tim Graham, 7 years ago

We're recommending the mysqlclient MySQLdb fork. Is there a reason to prefer PyMySQL instead?

comment:2 by Tim Graham, 7 years ago

Resolution: needsinfo
Status: newclosed

comment:3 by pojda, 6 years ago

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!

in reply to:  3 comment:4 by Sergey Fedoseev, 6 years ago

Cc: Sergey Fedoseev added

Replying to 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

in reply to:  1 comment:5 by andreymal, 5 years ago

Replying to 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.

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