You could try using the pure-python pymysql
:
sudo easy_install pymysql
(Or use pip
if you have it installed.) Then, add this before you import MySQLdb
in your code:
try:
import pymysql
pymysql.install_as_MySQLdb()
except ImportError:
pass