
MySQL Connector/Python Developer Guide
Mar 11, 2025 · This manual describes how to install and configure MySQL Connector/Python, a self-contained Python driver for communicating with MySQL servers, and how to use it to develop database applications. The latest MySQL Connector/Python version is recommended for use with MySQL Server version 8.0 and higher.
Download Connector/Python - MySQL
MySQL Connector/Python is a standardized database driver for Python platforms and development. Additionally, MySQL Connector/Python 8.0 and higher supports the new X DevAPI for development in MySQL Server 8.0 and beyond.
Chapter 1 Introduction to MySQL Connector/Python
Converting parameter values back and forth between Python and MySQL data types, for example Python datetime and MySQL DATETIME. You can turn automatic conversion on for convenience, or off for optimal performance. All MySQL extensions to standard SQL syntax.
5.1 Connecting to MySQL Using Connector/Python
Using the Connector/Python Python or C Extension. Connector/Python offers two implementations: a pure Python interface and a C extension that uses the MySQL C client library (see Chapter 8, The Connector/Python C Extension). This can be configured at runtime using the use_pure connection argument.
6.1 Introduction to MySQL Connector/Python
MySQL Connector/Python enables Python programs to access MySQL databases, using an API that is compliant with the Python Database API Specification v2.0 (PEP 249). For notes detailing the changes in each release of Connector/Python, see MySQL Connector/Python Release Notes .
7.1 Connector/Python Connection Arguments - MySQL
Connector/Python can use a pure Python interface to MySQL, or a C Extension that uses the MySQL C client library. The use_pure mysql.connector.connect() connection argument determines which. The default changed in Connector/Python 8 from True (use the pure Python implementation) to False.
Installation — MySQL Connector/Python X DevAPI Reference 9.3.0 ...
Python development files. MySQL Connector/C or MySQL Server installed. Installing Connector/Python from source on Unix and Unix-Like Systems¶ To install Connector/Python from a tar archive, download the latest version (denoted here as …
Chapter 4 Connector/Python Installation - MySQL
Connector/Python includes the classic and X DevAPI APIs, which are installed separately. Each can be installed by a binary or source distribution. Binaries of Connector/Python are distributed in the RPM and the wheel package formats.
MySQL :: MySQL Connector/Python Developer Guide :: 9.4 …
from mysql.connector.aio import connect # Connect to a MySQL server and get a cursor cnx = await connect(user="myuser", password="mypass") cur = await cnx.cursor() # Execute a non-blocking query await cur.execute("SELECT version()") # Retrieve the results of the query asynchronously results = await cur.fetchall() print(results) # Close cursor ...
Getting started — MySQL Connector/Python X DevAPI Reference …
Dec 24, 2024 · If you are using a DNS server with service discovery utility that supports mapping SRV records, you can use the mysqlx+srv scheme or dns-srv connection option and Connector/Python will automatically resolve the available …