MySQL Connector/Python 安装、测试
# pythonPython 2.7.3 (default, Jul 18 2013, 20:53:58)
on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mysql.connector
>>> cnx = mysql.connector.connect(user=\'waterbin\',password=\'123\',host=\'192.168.1.115\',database=\'test\')
>>> cur=cnx.cursor()
>>> cur.execute(\'select * from t\')
>>> print cur.fetchall()
[(1,)]
页:
[1]