skillfed

mysqlclient

Python interface to MySQL

mysqlclient Copyleft license GPL-2.0-or-later Active 2,532 v2.2.8 released

Install

mysqlclient on PyPI

pip

pip install mysqlclient

uv

uv add mysqlclient

poetry

poetry add mysqlclient

Package facts

License GPL-2.0-or-later (copyleft)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 184 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: mysqlclient-2.2.8-cp310-cp310-win_amd64.whl; mysqlclient-2.2.8-cp311-cp311-win_amd64.whl; mysqlclient-2.2.8-cp312-cp312-win_amd64.whl; mysqlclient-2.2.8-cp313-cp313-win_amd64.whl; mysqlclient-2.2.8-cp314-cp314t-win_amd64.whl; mysqlclient-2.2.8-cp314-cp314-win_amd64.whl

Keywords: MySQL

Development Status :: 5 - Production/StableEnvironment :: Other EnvironmentOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: Windows :: Windows NT/2000Operating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: CProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DatabaseTopic :: Database :: Database Engines/Servers

About mysqlclient

from the package's own PyPI description — quoted content, verbatim

mysqlclient

This project is a fork of MySQLdb1. This project adds Python 3 support and fixed many bugs.

  • PyPI: https://pypi.org/project/mysqlclient/
  • GitHub: https://github.com/PyMySQL/mysqlclient

Support

Do Not use Github Issue Tracker to ask help. OSS Maintainer is not free tech support

When your question looks relating to Python rather than MySQL/MariaDB:

Or when you have question about MySQL/MariaDB:

Free threading Python

> [!NOTE] > The support for Free threading Python is experimental.

Since v2.2.8, free threading is supported when importing the extension module. Therefore, importing MySQLdb does not acquire GIL.

However, this library does not support simultaneous operations on a single Connection object from multiple threads, regardless of free threading, and the behavior in such cases...

Read as markdown · JSON record · Source repository · Docs

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

mysqlclient provides a Python interface to MySQL and MariaDB databases, enabling direct connections and query execution from Python 3 applications.

Medium install friction due to compiled C extension dependencies. Windows users benefit from pre-built wheels for Python 3.10–3.14; macOS and Linux require system libraries and build tools installed beforehand. Maintenance is active with recent commits and 2532 GitHub stars.

Licensed under GPL-2.0-or-later (copyleft). Derivative works and distributions must comply with GPL terms, including source code disclosure obligations. Proprietary applications linking this library may face licensing constraints.

Usage

pip install mysqlclient
import mysqlclient

Requires MySQL or MariaDB client libraries and development headers installed on the system; Python ≥3.10 required. Windows users should use pre-built wheels; source builds on Windows require MariaDB C Connector and Visual Studio.

Verdict: mysqlclient is a stable, actively maintained MySQL/MariaDB driver for Python 3.10+ with no known vulnerabilities. Medium install friction is offset by pre-built wheels on Windows and straightforward setup on Unix-like systems. GPL-2.0-or-later licensing requires careful review for proprietary projects.

Needs verification

  • Whether simultaneous multi-threaded access to a single Connection object is a practical blocker for intended use cases
  • Compatibility and performance implications of experimental free-threading support in Python 3.13+
  • Specific API and connection patterns supported by this package
mysql python drivermysql database connectorpython mysql clientmariadb python interfacemysql query executiondatabase connection mysqlpython mysql adapter

Similar packages