Take the 2-minute tour ×

We would like to use Google App Engine for a Django project for rapid development and scalable deployment. We'd also like to use an existing MySQL server as a database. In theory this would eliminate the problems with using the Google App Engine storage solutions and Django.

Unfortunately, although the app works locally, I get the following error when I deploy:

ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

From posts by people wanting to do this with Java I understand that I can't open a MySQL port from GAE. This being the case, is there a drop-in solution for accessing a remote MySQL database (using a technique like tunnelling over HTTP) in Python that would let me keep using the Django ORM features?

share|improve this question
Rather than accessing your existing MySQL database, why not port to BigTable using djangoappengine? –  eggyal Jun 7 '12 at 17:51
Thanks, but it is a business requirement that we use SQL. –  dark fader Jun 11 '12 at 12:43
add comment

1 Answer

up vote 0 down vote accepted

You cannot access your own Mysql, however you can use Google cloud Sql.

share|improve this answer
Thank you. Unfortunately the Google Cloud SQL solution is in Beta: " Spaces in the program are currently limited, with a wait time of at least 2 weeks. We are currently prioritizing providing spaces for existing Google App Engine Java and Python projects. " This isn't acceptable as we have no current GAE app in place and we need to start development now. Using this service would be a wait of 2 weeks at least, with no guarantee of acceptance. –  dark fader Jun 7 '12 at 17:59
@darkfader: You can develop against a local MySQL environment whilst awaiting your invitation. –  eggyal Jun 7 '12 at 18:06
I could. But with no guarantee of getting on the service and no official release date I wouldn't feel comfortable recommending that as a solution. –  dark fader Jun 7 '12 at 18:19
Just apply for the Beta. I got mine in less than a week. That was a year ago though. –  dannyroa Jun 7 '12 at 19:33
OK. Despite the questions and explanatory text being heavily weighted against new Google App Engine users, I have applied - using 0 in many boxes. (Like 'current database size'). I'll report back with any result, but unless there's another way of doing this (similar to that in the original question) I still can't recommend it as a viable solution. –  dark fader Jun 7 '12 at 20:08
show 2 more comments

Your Answer


