推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
tanteng
V2EX  ›  Python

Python3 连 MySQL 的库大家用什么?

  •  
  •   tanteng · May 11, 2015 · 4226 views
    This topic created in 4196 days ago, the information mentioned may be changed or developed.

    mysqldb好像不支持Python3吧,那么大家在Python3连MySQL用的什么库?

    另外django支持Python3,那么django在Python3下如何做到连MySQL的呢?

    这两个问题,谢谢大家回答!

    7 replies  •  2015-05-12 11:38:17 +08:00
    lichun
    lichun
    May 11, 2015
    1
    haofly
    haofly
    May 11, 2015
    2
    mysqlclient 方便Django用
    yopming
    yopming
    May 11, 2015
    3
    mysql-connector-python
    pip的时候要加个allow-external好像
    zijing07
    zijing07
    May 12, 2015
    4
    pymysql,提供了mysqldb的适应解决方法,楼上的没用过,之后要尝试对比一下
    carilove
    carilove
    May 12, 2015
    5
    之前用的mysql-connector, 毕竟MySQL官方出的。
    但是在用SQLAlchemy的时候, mysql-connector对utf8mb4的支持有问题,转而用pymysql,目前感觉良好
    wingyiu
    wingyiu
    May 12, 2015
    6
    mysqlclient a fork of MySQLdb1 with python3 support
    `https://github.com/PyMySQL/mysqlclient-python`
    tanteng
    tanteng
    OP
    May 12, 2015
    7
    @zijing07 pymysql是现在主流的用于Python3下连接mysql的库吗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3657 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 05:20 · PVG 13:20 · LAX 21:20 · JFK 00:20
    ♥ Do have faith in what you're doing.