Skip to content

Instantly share code, notes, and snippets.

@papachan
Created December 2, 2011 14:48
Show Gist options
  • Save papachan/1423493 to your computer and use it in GitHub Desktop.
Save papachan/1423493 to your computer and use it in GitHub Desktop.
import MySQLdb
if __name__ == "__main__":
db = MySQLdb.Connect(host="localhost", user="user",passwd="",db="mysqldbname")
cursor = db.cursor()
cursor.execute("SHOW ENGINES")
for row in cursor.fetchall():
print row
cursor.close()
db.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment