#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)
follow-up: 5 comment:1 by , 8 years ago
comment:2 by , 8 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
follow-up: 4 comment:3 by , 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!
comment:4 by , 6 years ago
Cc: | 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
comment:5 by , 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.
We're recommending the mysqlclient MySQLdb fork. Is there a reason to prefer PyMySQL instead?