gath
gath

Reputation: 25452

How do i import MySQLdb module on GAE?

Am building an intranet site and am using GAE, but i want to access some data that lies in some MYSQl database.

How do i import MySQLdb module?

When i try:

import MySQLdb

GAE complains that there is no module named MySQLdb!!

When is try this;

import django.db.backends.mysql

it goes through,seems like GAE likes django (parasitic behavior).

I need to use MySQLdb module and MySQLdb.cursors

Help

Upvotes: 1

Views: 517

Answers (1)

Chris Farmiloe
Chris Farmiloe

Reputation: 14175

  • There is no MySQL infrastructure on GAE
  • Connecting to an external MySQL data source would imply working outside of the sandbox
  • Using mysql during local development might be possible, but ultimately pointless.

If you need to access an external data source, you will need to do so over some kind of HTTP API using urlfetch

Upvotes: 5

Related Questions