Basic connection to MySQL with mysqldb : MySQL : Database PYTHON TUTORIALS


PYTHON TUTORIALS » Database » MySQL »

 

Basic connection to MySQL with mysqldb


import MySQLdb

print "Connecting..."
dbh = MySQLdb.connect(db = "foo")
print "Connection successful."
dbh.close()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Database
» MySQL