Pymysql operation database and pymysql Database
I. Introduction
Pymsql is a module used to operate MySQL in Python. Its usage is almost the same as that of MySQLdb. However, pymysql currently supports python3.x, while the latter does not support
Python uses pymysql to operate mysql and pythonpymysql
Pymsql is a module used to operate MySQL in Python. Its usage is almost the same as that of MySQLdb. However, pymysql currently supports python3.x, while the latter does not support version 3.x.
This article explains how to use pymysql to operate mysql in python. it is very simple and practical. if you need it, you can refer to pymsql as a module for operating MySQL in Python, its usage is almost the same as that of MySQLdb. However,
Python3 uses PyMysql to connect to the mysql database instance, and python3pymysql
Python 3.x is completely backward compatible, so that we can use a library in python2.x normally. For example, mysqldb cannot be used in python3.Currently, MySQLdb
Python3 using PyMysql to connect to the mysql database python 3.x is completely incompatible with the forward, resulting in a library that can be used normally in python2.x, which won't be used in python3. for example, mysqldb
Currently, MySQLdb
First, create MySQL, authorizeRights ManagementWe know that our top authority manager is the root user, and it has the highest permissions. Includes select, Update, delete, update, Grant, and so on. So in general, after the company, the DBA engineer
Python 3x is completely incompatible with the forward, resulting in a library that can be used normally in python2x, which cannot be used in python3. for example, mysqldb currently does not support python 3 python 3. x is completely backward
Python 3.x database connection example (pymysql mode), pythonpymysql
Because the MySQLdb module does not support Python3.x, you need to install the pymysql module if you want to connect to MySQL.
The pymysql module can be installed through pip. If
What is Pymysql?
Pymysql is a library used in the python3.x version to connect to the MySQL server, and MySQLdb is used in Python2.
Pymysql follows the Python database API v2.0 specification and includes the Pure-python MySQL client
The Python language's 3 x is completely non-forward compatible, resulting in a library that we can work with in Python2 X, which is python3 for example MYSQLDB currently MYSQLDB does not support Python3The 3.x of the Python language is completely
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.