Wednesday, October 29, 2014

Re: Error was: No module named 'django.db.backends.pymysql'

Hello,

In your settings.py (or somewhere early in the code), run this:

import pymysql
pymysql
.install_as_MySQLdb()

Then, set your BACKEND to django.db.backends.mysql.

Or, better yet, install https://github.com/PyMySQL/mysqlclient-python as that is our recommended choice for using MySQL with Django.
https://docs.djangoproject.com/en/1.7/ref/databases/#mysql-db-api-drivers

Collin

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/995eedd9-3ff4-4800-927d-97336a8504a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment