Advertisement
Guest User

Untitled

a guest
Jun 9th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. python setup.py build
  2. python setup.py install
  3.  
  4. import pymysql
  5. import pymysql.cursor
  6. conn= pymysql.connect(host='localhost',user='user',password='user',db='testdb',charset='utf8mb4',cursorclass=pymysql.cursors.DictCursor)
  7. a=conn.cursor()
  8. sql='CREATE TABLE `users` (`id` int(11) NOT NULL AUTO_INCREMENT,`email` varchar(255) NOT NULL,`password` varchar(255) NOT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'
  9. a.execute(sql)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement