Created
March 30, 2015 02:29
-
-
Save TechR10n/a33a5601bae0c295b7a2 to your computer and use it in GitHub Desktop.
sql connect
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
#!/usr/bin/python | |
print "Content-type:text/html\n\n" | |
import MySQLdb | |
try: | |
conn = MySQLdb.connect ( | |
host = "ideapapernet.fatcowmysql.com", | |
user = "ryanfourier", | |
passwd = "*password*", | |
db = "arduino_1") | |
except MySQLdb.Error, e: | |
print "Error %d: %s" % (e.args[0], e.args[1]) | |
sys.exit (1) | |
print "connected to the database" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment