I also struggled with making MySQL work with Django 1.6 and Python 3.3; the only thing that worked was to switch to PyMySQL. See my post on that here
Adding the answer below
My environment: OSX 10.9, Python 3.3.3, Django 1.6.1, PyMySQL 0.6.1, MySQL Server 5.5 on Windows
How to make it work:
-
Install PyMySQL version 0.6.1 (https://github.com/PyMySQL/PyMySQL/): you can install it either by using pip, i.e. :
pip install PyMySQL
or by manually downloading the package; there is a good documentation on their website on how to do that. -
Open your Django App __init__.py and paste the following lines:
import pymysql pymysql.install_as_MySQLdb()
-
Now, open settings.py and make sure your DATABASE property looks like this:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mydb', 'USER': 'dbuser', 'PASSWORD': 'dbpassword', 'HOST': 'dbhost', 'PORT': '3306' } }
-
That’s it, you should be able to execute
python manage.py syncdb
to init your MySQL DB; see the sample output below:Creating tables ... Creating table django_admin_log Creating table auth_permission Creating table auth_group_permissions ... ... Creating table socialaccount_socialtoken You just installed Django's auth system, which means you don't have any superusers defined. ...