We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development has moved. Please open new issues at https://github.com/pypyodbc/pypyodbc/issues 请问想读取sql文件,connect连接的数据库类型是Mysql,应该怎么写哈?
pypyodbc.lowercase = False # 是否将字段名转为小写 # conn = pypyodbc.connect(r"Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + filePath + ";Uid=;Pwd=;") conn = pypyodbc.connect('DSN=MYSQL' + filePath + ";Uid=;Pwd=;") cursor = conn.cursor()
The text was updated successfully, but these errors were encountered:
您需要使用 Mysql 连接器,而不是 ODBC 连接器,您可以使用以下连接器: https://dev.mysql.com/doc/connector-python/en/connector-python-example-connecting.html 这是一个更详细的教程,解释了前面的步骤和其他细节,如果您正在学习,这些细节将非常有用: https://realpython.com/python-mysql/
Sorry, something went wrong.
No branches or pull requests
Development has moved. Please open new issues at https://github.com/pypyodbc/pypyodbc/issues
请问想读取sql文件,connect连接的数据库类型是Mysql,应该怎么写哈?
The text was updated successfully, but these errors were encountered: