简体   繁体   English

如何使用python 3连接MySQL

[英]How to connect MySQL with python 3

everyone I am new to python and I want to connect MySQL database with python 3 script. 每个人我都是python的新手,我想用MySQL 3脚本连接MySQL数据库。 I did some googling but couldn't find anything for python 3 although there are methods for earlier python releases. 虽然有早期python发布的方法,但我做了一些谷歌搜索,但找不到任何python 3的东西。 Could anyone suggest a method? 有谁能建议一个方法?

MySQL-Connector , oursql and PyMySQL all support Python 3. They are also all supported by SQLAlchemy , which also supports Python 3. MySQL-ConnectoroursqlPyMySQL都支持Python 3.它们也都受SQLAlchemy的支持,它也支持Python 3。

So most likely you's want to use SQLAlchemy + one of the above conectors. 所以很可能你想使用SQLAlchemy +上面的一个conectors。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM