python mysql Connect Pool mysql连接池 (201上海时时乐走

>>> cursor = conn.cursor(dictionary=True)

[{u'Tables_in_zentao': u'task'}]

 

>>> cursor.execute("show tables");

[{u'Tables_in_zentao': u'task'}]

>>> cursor.fetchall()

>>> cursor.execute("show tables");

>>>import mysql.connector as conner

>>> cursor.fetchall()

 easy_install mysql-connector-python

>>> conn = conner.connect(user="root", passwd="kaimen", db="zentao", port=3306, pool_name = "mypool", pool_size = 3,)

>>> cursor.execute("show tables");

 

>>> cursor = conn.cursor(cursor_class=conner.cursor.MySQLCursorDict)

[(u'task',)]

>>> cursor.fetchall()

>>> cursor = conn.cursor()

本文由上海时时乐走势图发布于上海时时乐走势图官网,转载请注明出处:python mysql Connect Pool mysql连接池 (201上海时时乐走

您可能还会对下面的文章感兴趣: