Improve MySQLdb support