Skip to main content

mysqlclient-static

English | 简体中文

Self-contained mysqlclient wheels for Linux AMD64 and macOS ARM64. Install a wheel and use MySQLdb without compiling code or installing MySQL/MariaDB client libraries or authentication plugins.

This project packages mysqlclient. Django uses its standard django.db.backends.mysql backend.

Installation

uv add mysqlclient-static

With pip:

python -m pip install --only-binary=:all: mysqlclient-static

For offline installation, download the wheel matching your Python version and platform from GitHub Releases. For example, with CPython 3.12 on macOS ARM64:

python -m pip install --no-index \
  ./mysqlclient_static-2.3.0.post2-cp312-cp312-macosx_11_0_arm64.whl

Replacing mysqlclient

Both distributions provide MySQLdb. Keep one in your application dependencies:

python -m pip uninstall -y mysqlclient
python -m pip install --only-binary=:all: mysqlclient-static

A dependency declared as mysqlclient still needs to be handled in your application's dependency configuration; installing mysqlclient-static does not satisfy that distribution name.

Supported versions

Python Upstream mysqlclient Distribution version Platforms
CPython 3.9 2.2.7 2.2.7.post2 Linux AMD64, macOS ARM64
CPython 3.10–3.14 2.3.0 2.3.0.post2 Linux AMD64, macOS ARM64

Linux wheels use the manylinux_2_28_x86_64 baseline. macOS wheels target macosx_11_0_arm64 (macOS 11 or later). These wheels target regular CPython.

The wheels contain MariaDB Connector/C 3.4.11, OpenSSL 3.5.9, zlib 1.3.2 and zstd 1.5.7. Linux uses the system glibc; macOS uses its system libraries.

Version numbers and wheel names

The distribution version is the upstream mysqlclient version followed by this project's packaging revision: 2.3.0.post2 means mysqlclient 2.3.0, packaging revision 2. Updates to the bundled libraries or packaging increase .postN; an upstream update starts a new version line, such as 2.3.1.post1.

Python and platform compatibility are recorded in the wheel filename:

mysqlclient_static-2.3.0.post2-cp312-cp312-macosx_11_0_arm64.whl
Part Meaning
2.3.0.post2 Upstream version and packaging revision
First cp312 CPython 3.12
Second cp312 CPython 3.12 application binary interface (ABI)
macosx_11_0_arm64 macOS 11 or later, ARM64

Each GitHub Release groups all wheels for one distribution version under a tag such as v2.3.0.post2. That version has 10 wheels: five Python versions across two platforms. v2.2.7.post2 has two wheels for Python 3.9. PyPI and GitHub Releases distribute the same files.

MySQL Server versions such as 8.0.46 and 8.4.13 describe database compatibility; they are separate from the Python driver's version.

Typical usage

Set DB_USER, DB_PASSWORD and DB_NAME in your environment:

import os
import MySQLdb
from MySQLdb.cursors import DictCursor

with MySQLdb.connect(
    host="127.0.0.1",
    user=os.environ["DB_USER"],
    password=os.environ["DB_PASSWORD"],
    database=os.environ["DB_NAME"],
    charset="utf8mb4",
) as connection:
    with connection.cursor(DictCursor) as cursor:
        cursor.execute("SELECT %s AS message", ("你好,MySQL",))
        print(cursor.fetchone())

Use %s placeholders and pass values separately. Commit writes explicitly with commit() and call rollback() on failure. A connection's with block closes the connection; it does not commit the transaction automatically.

Coding agents and examples

Every wheel includes these files:

Installed path Contents
MySQLdb/README.md English installation guide and typical usage
MySQLdb/README_CN.md The same guide in Simplified Chinese
MySQLdb/AGENTS.md API, transactions, connection lifecycle and integration
MySQLdb/api-symbols.json Signatures, docstrings and symbols from the upstream source
MySQLdb/examples/ Connection, transaction, Django settings and Celery task examples
from importlib.resources import files

print(files("MySQLdb").joinpath("README.md").read_text())
print(files("MySQLdb").joinpath("api-symbols.json"))

The agent guide and examples/ are maintained with the package. Each upstream version gets its own symbol index.

Compatibility baselines, bundled-library choices, and instructions for building, testing and publishing are in docs/development.md.

License and source

This project's independent original code, build scripts, configuration, documentation and examples use the MIT license. Upstream sources and derived content retain their original licenses. Combined wheels are distributed under GPL-3.0-or-later, with component copyright and license notices retained. Each Release includes corresponding-source-*.tar.gz with the original sources, build scripts, configuration and source records.

See the component list.

Metadata

Release files for mysqlclient-static 2.3.0.post2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for mysqlclient-static 2.3.0.post2
File
mysqlclient_static-2.3.0.post2-cp314-cp314-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.26+ x86-64 Details
mysqlclient_static-2.3.0.post2-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
mysqlclient_static-2.3.0.post2-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.26+ x86-64, Linux glibc 2.28+ x86-64 Details
mysqlclient_static-2.3.0.post2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
mysqlclient_static-2.3.0.post2-cp312-cp312-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.26+ x86-64, Linux glibc 2.28+ x86-64 Details
mysqlclient_static-2.3.0.post2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
mysqlclient_static-2.3.0.post2-cp311-cp311-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.26+ x86-64, Linux glibc 2.28+ x86-64 Details
mysqlclient_static-2.3.0.post2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
mysqlclient_static-2.3.0.post2-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.26+ x86-64 Details
mysqlclient_static-2.3.0.post2-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 30.4 MB

Release files / mysqlclient_static-2.3.0.post2-cp314-cp314-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL mysqlclient_static-2.3.0.post2-cp314-cp314-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.14 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
551a4579f1504e7ef6ce0e70ec53ade629046bf0341dc575a1001790693f04df
BLAKE2b-256 checksum
How to use checksums
bc685466285cad26563e0875aaefc1be2aebdbea1de6b0c316e7e6a3b32a3ecc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mysqlclient_static-2.3.0.post2-cp314-cp314-macosx_11_0_arm64.whl

Download URL mysqlclient_static-2.3.0.post2-cp314-cp314-macosx_11_0_arm64.whl
Size 2.9 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
dde4bbc7367f228e0851479c51eedec2de990768b397648ba6893c9b1d9253af
BLAKE2b-256 checksum
How to use checksums
5f3ccfe7b4f75ca1e5acdd4c3fc24fafba21a76b164f0d16eee30e7867bdc764
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mysqlclient_static-2.3.0.post2-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL mysqlclient_static-2.3.0.post2-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.13 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a71c99304369685438935ec1b451552cb4c8afd001d26b36db91c499890db05e
BLAKE2b-256 checksum
How to use checksums
5391c9cdb557caabb8eb1f107e4ab0edec160b95cf28a09037b34c0210f30574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mysqlclient_static-2.3.0.post2-cp313-cp313-macosx_11_0_arm64.whl

Download URL mysqlclient_static-2.3.0.post2-cp313-cp313-macosx_11_0_arm64.whl
Size 2.9 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fd75177b68d66f38aab18a6e718bb3d12bc4eab9ece3b22bb8a100167398acb6
BLAKE2b-256 checksum
How to use checksums
d420af911d16b7b9ac7ee84eb0aa1b06b9a2f27e4337837748c0575a727d86bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mysqlclient_static-2.3.0.post2-cp312-cp312-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL mysqlclient_static-2.3.0.post2-cp312-cp312-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.12 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
93de06bff686a639c44e667072c702ea89291684fc6fc4ba79aa3b36878c09fa
BLAKE2b-256 checksum
How to use checksums
3a42255745c1164f3bdb0f2214914abc7b83933304c21b7666cf86a695514b8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mysqlclient_static-2.3.0.post2-cp312-cp312-macosx_11_0_arm64.whl

Download URL mysqlclient_static-2.3.0.post2-cp312-cp312-macosx_11_0_arm64.whl
Size 2.9 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
393cbc9f75b97c05e85af63de0fa673ecd6a84d62d388812369b799ecd014191
BLAKE2b-256 checksum
How to use checksums
5107f05405e5873b75f5f10dfba49a24edfaecb07640aa0d03387882bfd8ce08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mysqlclient_static-2.3.0.post2-cp311-cp311-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL mysqlclient_static-2.3.0.post2-cp311-cp311-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.11 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0d3f3ee981d26d3d9c37425a98747d9531f66f8291c06b8012f799ad3bf4dcbe
BLAKE2b-256 checksum
How to use checksums
217199e76b5b55cf5f0bade78a4a90eac7d558e8dde090dec71a13a3860d8683
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mysqlclient_static-2.3.0.post2-cp311-cp311-macosx_11_0_arm64.whl

Download URL mysqlclient_static-2.3.0.post2-cp311-cp311-macosx_11_0_arm64.whl
Size 2.9 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b5854a95b0051eb4fa2e8670e361fd1e8382d694d979a69b7554d56e66310857
BLAKE2b-256 checksum
How to use checksums
634faca4c093bfb49f20d85b83e9606bf92065753635e2cf312a7b18de13d5cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mysqlclient_static-2.3.0.post2-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl

Download URL mysqlclient_static-2.3.0.post2-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.10 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5d93a3e3ef9c2cb430ebd4efb8c78d129faa020d433d94bc6e00efdeb907b311
BLAKE2b-256 checksum
How to use checksums
e6db76c46070d812e0fbeb80297082b09f39446a92bada6d6d1fe8b8455cfe15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mysqlclient_static-2.3.0.post2-cp310-cp310-macosx_11_0_arm64.whl

Download URL mysqlclient_static-2.3.0.post2-cp310-cp310-macosx_11_0_arm64.whl
Size 2.9 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
62c0924ba7e7f10f22c746f43ca82846f7d0ff449964d9cf3bbff3b980d4d14e
BLAKE2b-256 checksum
How to use checksums
4361ee9578b01e064aeb750da8d5d146416fe760e45733bde999fd430ee3bcd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for mysqlclient-static 2.3.0.post2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page