Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#18970 closed Bug (fixed)

Document that Django doesn't work with MySQL under Python 3

Reported by: rajeevramdas@… Owned by: nobody
Component: Python 3 Version: master
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I am trying to use the Django with experimental Python 3 support on Linux.
I have installed MySqldb for connectivity with Mysql. (I have used the MySqldb with the python 3 support, from
When i run python syncdb it gives me the following error.

python syncdb
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table django_site
DatabaseError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s AND django_content_type.app_label = %s )' at line 1")

Change History (6)

comment:1 Changed 4 years ago by claudep

  • Component changed from Uncategorized to Python 3
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to New feature

Yes, it is known that the MySQL support for Python 3 is not yet ready in Django, mainly because the official MySqldb has not migrated to Python 3.

Let's keep this as a TODO reminder or as a documentation ticket to specify that Django-Python3-MySQL is not supported yet if we don't make it before 1.5 release.

comment:2 Changed 4 years ago by aaugustin

  • Severity changed from Normal to Release blocker
  • Summary changed from Django Python 3 experimental support, python syncdb, 1064 error. to Document that Django doesn't work with MySQL under Python 3
  • Type changed from New feature to Bug
  • Version changed from 1.4 to master

We're about to release 1.5.

We should say that MySQL is unsupported in the "Python 3 support" paragraph of the release notes.

Does anyone know if Oracle works? cx_Oracle supports on Python 3, but I don't know if we ever ran the test suite with Oracle and Python 3.

comment:3 Changed 4 years ago by claudep

Another important current limitation to document is PIL (no ImageField on Python 3). Our best hope for a Python 3 port is with

comment:4 Changed 4 years ago by claudep

... and Selenium (LiveServerTestCase),

comment:5 Changed 4 years ago by Aymeric Augustin <aymeric.augustin@…>

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

In 37b3fd27ae63001cb3258f7d147aeb24712d00a2:

Fixed #18970 -- Documented know limitations under Python 3.

comment:6 Changed 4 years ago by Aymeric Augustin <aymeric.augustin@…>

In be4259004fd21ff5c78f02e9093a0786780e1c21:

[1.5.x] Fixed #18970 -- Documented know limitations under Python 3.

Backport of 37b3fd2 from master.

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