mysqlclient
Python interface to MySQL
Install
mysqlclient on PyPI
pip
pip install mysqlclientuv
uv add mysqlclientpoetry
poetry add mysqlclientPackage 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
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:
- Python mailing list python-list
- Slack pythondev.slack.com
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...
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
Similar packages
permissive · top 1,000 on PyPI
pyperclippermissive · top 1,000 on PyPI
distropermissive · top 1,000 on PyPI
mysql-connector-pythoncopyleft · top 1,000 on PyPI
matplotlibpermissive · top 1,000 on PyPI
numpypermissive · top 100 on PyPI
peeweeunclear · top 1,000 on PyPI
argparsepermissive · top 1,000 on PyPI
langchain-communitypermissive · top 1,000 on PyPI
pendulumpermissive · top 1,000 on PyPI