pyodbc and mySQL

后端 未结 6 1370
死守一世寂寞
死守一世寂寞 2021-01-05 17:30

I am unable to connect to mySQl db using pyodbc.

Here is a snippet of my script:

import pyodbc
import csv

cnxn = pyodbc.connect(\"DRIVER={MySQL ODBC         


        
6条回答
  •  悲&欢浪女
    2021-01-05 17:40

    MySQLdb (or oursql) and pyodbc both have the same interface (DB-API 2), only you don't have to deal with ODBC's issues if you use the former. I strongly recommend you consider using MySQLdb (or oursql) instead.

提交回复
热议问题