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