Django eighth Lesson 2. "MySQL Related software"

Source: Internet
Author: User
Tags virtual environment virtualenv

MySQL driver Installation:

We use Django to operate MySQL, which actually operates from the bottom of Python. So we want to use Django to operate MySQL, but first we need to install a driver. In Python3, there are a number of options for the driver. such as Pymysql and Mysqlclient. Here we use Mysqlclient to operate. Mysqlclient installation is very simple. Only need to enter the VIRTUALENV virtual environment ' Workon [virtualenv Virtual Environment] ', and then ' pip install Mysqlclient ', you can install.

Introduction to Common MySQL drivers:

1:mysql-python: That is mysqldb. is a simple package for the C-language operation of the MySQL database. Followed the Python DB API v2. But only support Python2, not currently supported Python3

2:mysqlclient: is another branch of Mysql-python. Supports Python3 and fixes some bugs.

3:pymysql: A driver of pure Python implementation. Because it is written in pure python, execution is less efficient than Mysql-python. And because it's written in pure Python, it's seamlessly linked to Python code.

4:mysql Connector/python:mysql is officially launched using pure Python to connect to MySQL driver. Because it's a pure Python development, it's not efficient.

Django eighth Lesson 2. "MySQL Related software"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.