Skip to content

Instantly share code, notes, and snippets.

@TechR10n
Created March 30, 2015 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TechR10n/a33a5601bae0c295b7a2 to your computer and use it in GitHub Desktop.
Save TechR10n/a33a5601bae0c295b7a2 to your computer and use it in GitHub Desktop.
sql connect
#!/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