_mysql_exceptions.ProgrammingError: (1064, “You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘show tables’ at line 1”)
Собственно код скрипта:
import MySQLdb as mysql
cur = mysql.connect(user="user",passwd="passwd",db="db").cursor()
cur.execute("explain show tables")
print(cur.fetchall())