You need the Python MySQL API. I guess you find it on the mysql site. Here is how you do, from memory : You can also declare a specific "cursor" I think, like by doing x = a.cursor() If you need helped reply below.