The Python Database API is described in PEP 249. MySQL has three prominent drivers that implement this API:

  • MySQLdb is a native driver that has been developed and supported for over a decade by Andy Dustman.
  • mysqlclient is a fork of MySQLdb which notably supports Python 3 and can be used as a drop-in replacement for MySQLdb. At the time of this writing, this is the recommended choice for using MySQL with Django.
  • MySQL Connector/Python is a pure Python driver from Oracle that does not require the MySQL client library or any Python modules outside the standard library.

All these drivers are thread-safe and provide connection pooling. MySQLdb is the only one not supporting Python 3 currently.

In addition to a DB API driver, Django needs an adapter to access the database drivers from its ORM. Django provides an adapter for MySQLdb/mysqlclient while MySQL Connector/Python includes its own.

mysqlclient

Django requires mysqlclient 1.3.3 or later. Note that Python 3.2 is not supported. Except for the Python 3.3+ support, mysqlclient should mostly behave the same as MySQLDB.

python3+Django1.11+mysql5.7 MySQL DB API Drivers的更多相关文章

  1. windows10 -- mysql5.5 + python3.4 + django1.11 +pycharm2016.2 + PyMySQL(DB DRIVER) 环境搭建

    环境介绍 2016-07-2513:32:26 name value comment OS win10 操作系统 python python3.4 python主程序 IDE pycharm:  20 ...

  2. python3 django1.11 安装xadmin 的方法,亲测可用

    首先需要Pip安装如下的包ip install django-crispy-forms pip install django-import-export pip install django-reve ...

  3. Python3.7&Django1.11.15 兼容性问题

    环境: 1. Windows10 2. python3.7 3. Django1.11.15 启动Django时抛出以下异常: Unhandled exception in thread starte ...

  4. python3.7环境下创建app、运行Django1.11版本项目报错Generator expression must be parenthesized

    有些同学喜欢追求新鲜感~但追求新鲜感终归是要付出一点点代价的 在编程领域有一句至理名言:用东西不要用最新的! 就像每次苹果系统的升级都会有相当一部分用户的手机成砖一样 下面我们就介绍一个因版本升级带来 ...

  5. python3.7环境下创建app,运行Django1.11版本项目报错SyntaxError: Generator expression must be parenthesized

    咳咳!!! 今天用命令行创建django项目中的app应用,出现了这样一个错误 这个错误在python3.6版本下安装运行django 1.11版本正常运行,但python3.7版本下运行django ...

  6. django1.11版本在python3.7中运行还有点兼容性问题.

    django1.11版本在python3.7中运行还有点兼容性问题. 出现SyntaxError: Generator expression must be parenthesized这个报错 找到这 ...

  7. Windows下Python3.6.2+Django-1.11.5+httpd-2.4.27-win64-VC14部署网站

    最近项目组正在上python+django.现在将部署过程总结下,相关文件也备份下,面得每次都要弄半天.网上很多不靠谱的做法,让我反复试错,浪费不少时间. 原材料: Python3.6.2 httpd ...

  8. PHP数据库操作:从MySQL原生API到PDO

    本文将举详细例子向大家展示PHP是如何使用MySQL原生API.MySQLi面向过程.MySQLi面向对象.PDO操作MySQL数据库的. 为了后面的测试,先建立数据库表test.包含表名user,s ...

  9. The MySQL C API 编程实例

    在网上找了一些MYSQL C API编程的文章,看了后认为还是写的不够充分,依据自己经验写了这篇<The MySQL C API 编程实例>,希望对须要调用到MYSQL的C的API的朋友有 ...

随机推荐

  1. ubuntu安装Docky 3.0

    添加PPA并在命令行安装,执行以下命令: sudo add-apt-repository ppa:ricotz/docky sudo apt-get update sudo apt-get insta ...

  2. MySQL的FORMAT函数用法规则

    1.FORMAT函数在mysql中是数据内容格式化的,格式化后得到结果:###,###,#####. ,); 输出结果: ,000.00 2.可以格式化数据为整数或者浮点数. ); 输出结果: 100 ...

  3. Scala语言简介和开发环境配置

    Scala语言的简介和开发环境搭建 Scala是一门结合了面向对象特征和函数式编程特征的语言,它是一个创新的编程语言产品.Scala可以做脚本(就像shell脚本一样),可以做服务端编程语言,可以写数 ...

  4. JVM中的JIT

    JVM中的JIT 介绍Java虚拟机的文章或者书籍总会提到Java虚拟机中的JIT编译器,可是JIT编译器到底是什么?为什么需要JIT编译呢? JIT编译器,是Just In Time编译的意思,又称 ...

  5. 初次用SqlServer查看本地的Excel文件时需要注意的地方

    日常用到通过SqlServer 读取Excel文件的案例 ,记录下来 文件路径 :C:\Users\Administrator\Desktop\icd10.xls 1.查询语句: SELECT  *F ...

  6. init方法返回值自动改写问题

    [init方法返回值自动改写问题] 在ARC开启的情况下,以init开头的实例方法的返回值会被默认无视,返回类型会被编译器改写为类指针类型. 如一人类叫UIButton类,如果一个方法叫 (UILab ...

  7. [转]SQLServer添加UPDATE回滚日志(update/delete/insert)

    下面直接上代码(copy到你的数据库里面直接就可以运行): CREATE PROCEDURE [dbo].[SP_UPDATE_LOG] ) AS BEGIN SET NOCOUNT ON; IF N ...

  8. 代码查看import的类是出自哪个jar包的方法(转)

    import java.security.ProtectionDomain; import java.security.CodeSource; public static void main(Stri ...

  9. ROS源码解读(一)--局部路径规划

    博客转载自:https://blog.csdn.net/xmy306538517/article/details/78772066 ROS局部路径导航包括Trajectory Rollout 和 Dy ...

  10. Hyperledger Fabric源码解析

    Hyperledger Fabric开源于2015年12月,截至2018年2月初有185个公司/组织成员加入.最初由IBM和DAH的工程师贡献,现在约有70名的代码贡献者,4000+代码提交,代码行数 ...