This pure Python MySQL client provides a DB-API to a MySQL database by talking directly to the server via the binary client/server protocol.
Example:
import pymysql
conn = pymysql.connect(host='127.0.0.1', unix_socket='/tmp/mysql.sock', user='root', passwd=None, db='mysql')
# conn =
... [More] pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd=None, db='mysql')
cur = conn.cursor()
cur.execute("SELECT Host,User FROM user")
# print cur.description
# r = cur.fetchall()
# print r
# ...or...
for r in cur:
print r
cur.close()
conn.close() [Less]
ThinkSQL is a cross-platform RDBMS. Compliance with the SQL standard means it supports transactions, sub-selects, views, set operators, and referential constraints. It has a multi-versioning engine and native ODBC, JDBC and Python drivers.
This site uses cookies to give you the best possible experience.
By using the site, you consent to our use of cookies.
For more information, please see our
Privacy Policy