Skip to content

Instantly share code, notes, and snippets.

@msbanik
Created June 20, 2014 16:56
Show Gist options
  • Save msbanik/e0c10996ab89586708b3 to your computer and use it in GitHub Desktop.
Save msbanik/e0c10996ab89586708b3 to your computer and use it in GitHub Desktop.
connect to mysql db and exec query
import pymysql
conn = pymysql.connect(host='172.19.3.126', user='vson', passwd='VsonSql', db='ems_cache')
query = ""
cur = conn.cursor()
cur.execute(query)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment