Created
December 2, 2011 14:48
-
-
Save papachan/1423493 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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