$npx skillfedfor your agent

mysql-connector-python

A self-contained Python driver for communicating with MySQL servers, using an API that is compliant with the Python Database API Specification v2.0 (PEP 249).

Worth itPyPI Software DevelopmentReleased Jul 202649.6M downloads / mocopyleft licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — mysql_connector_python-26.7.0-py2.py3-none-any.whl
v26.7.0 · released 2026-07-29 · Python >=3.10

Yes. This is the official MySQL driver for Python, actively maintained, with no runtime dependencies, and compliant with the standard database API. It supports current Python versions and carries no known vulnerabilities. The copyleft license requires attention if you are building proprietary software, but the FOSS exception typically permits use in open-source contexts. Install it when you need reliable MySQL connectivity from Python.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; MySQL server must be accessible at the specified host and port.
  • Installation is straightforward via pip with no runtime dependencies.
  • The package is actively maintained with a recent release and has been in production use since 2017.

License · maintenance · safety

copyleft license (copyleft) — Licensed under GNU GPLv2 with a FOSS License Exception, which permits use in open-source projects but may restrict proprietary software integration without careful review of the exception terms.

last release 2026-07-29 (16 days) · last repo commit 2026-07-29 · 958 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 49,550,032 downloads/mo, #581 on PyPI

Verify before relying

pip install mysql-connector-python

import mysql.connector

cnx = mysql.connector.connect(
    host="127.0.0.1",
    user="root",
    password="password")
cur = cnx.cursor()
cur.execute("SELECT CURDATE()")
print(cur.fetchone())
cnx.close()
  • Whether the optional installation extras (dns-srv, gssapi, webauthn, telemetry) are documented with their specific dependency lists and compatibility constraints.
  • Performance characteristics of the C-extension versus pure-Python implementation and when each is recommended.
  • Support status and stability of the mysql.ai module for HeatWave GenAI and AutoML features relative to the core connector.
Same gist for agents: .md · .json

What it is and what it does

MySQL Connector/Python is the official Python driver for MySQL databases, implementing the PEP 249 database API specification. It provides synchronous and asynchronous connectivity to MySQL servers, with optional C-extension acceleration for performance-critical workloads. The package includes both the Classic and X DevAPI connector interfaces and supports modern Python versions (3.10 through 3.14).

Beyond basic database access, the connector offers optional integration with MySQL HeatWave's AI and machine learning capabilities through the mysql.ai module, which provides LangChain-compatible GenAI components and Scikit-Learn-compatible AutoML estimators. These advanced features require separate installation of langchain, pandas, and scikit-learn. The core connector has zero runtime dependencies and installs cleanly via pip.

Use it for

  • Build Python web applications that need to query and update MySQL databases using standard PEP 249 cursor and connection interfaces.
  • Integrate asynchronous database operations into async/await Python code for non-blocking I/O in high-concurrency scenarios.
  • Connect Python data science workflows to MySQL HeatWave for AI-powered predictions and embeddings via LangChain or Scikit-Learn pipelines.
  • Develop ETL pipelines that read from or write to MySQL using the connector's standard query execution and result-fetching APIs.
  • Use the optional C-extension for performance-sensitive applications where pure-Python database access becomes a bottleneck.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

This is the official MySQL driver for Python, actively maintained, with no runtime dependencies, and compliant with the standard database API. It supports current Python versions and carries no known vulnerabilities. The copyleft license requires attention if you are building proprietary software, but the FOSS exception typically permits use in open-source contexts. Install it when you need reliable MySQL connectivity from Python.

Install

mysql-connector-python on PyPI

Before you install

Installation is straightforward via pip with no runtime dependencies. The package is actively maintained with a recent release and has been in production use since 2017.

Requires Python 3.10 or later; MySQL server must be accessible at the specified host and port.

License in practice

Licensed under GNU GPLv2 with a FOSS License Exception, which permits use in open-source projects but may restrict proprietary software integration without careful review of the exception terms.

Quickstart

pip install mysql-connector-python

import mysql.connector

cnx = mysql.connector.connect(
    host="127.0.0.1",
    user="root",
    password="password")
cur = cnx.cursor()
cur.execute("SELECT CURDATE()")
print(cur.fetchone())
cnx.close()

Verify before relying

  • Whether the optional installation extras (dns-srv, gssapi, webauthn, telemetry) are documented with their specific dependency lists and compatibility constraints.
  • Performance characteristics of the C-extension versus pure-Python implementation and when each is recommended.
  • Support status and stability of the mysql.ai module for HeatWave GenAI and AutoML features relative to the core connector.

Package facts

Licensecopyleft license copyleft
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 16 days since the last release
Last repo commit
First released
Downloads49,550,032 / month, #581 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationLicense :: OSI Approved :: GNU General Public License (GPL)Operating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DatabaseTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: mysql_connector_python-26.7.0-py2.py3-none-any.whl

Tags

Capabilities
mysql database driver pythonpep 249 mysql connectorpython mysql client librarymysql database apiconnect to mysql from python
Topics
database-drivermysqlasync-support
PyPI keywords
mysqldatabasedbconnectordriver

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pep 249 mysql connector”

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also mysql-connector-python-rf · mariadb · MySQL-python · PyMySQL · mysql-connector · mysql · mysqlclient · hdbcli · cloud-sql-python-connector