时间:2021-07-01 10:21:17 帮助过:22人阅读
5:使用pyodbc进行连接
import pyodbc
conn_info = (‘Driver{MySQL51};Server=%s;Port=%s;Database=%s;User=%s; Password=%s;Option=3;‘%(host, port, database, user,password))
mysql_conn = pyodbc.connect(conn_info)
mysql_cur = self.mysql_conn.cursor()
pyodbc连接MySQL数据库
标签:sql数据库 str pretty x86 sql nbsp .so tle figure