Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

mysqlclient

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

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:

Or when you have question about MySQL:

Install

Windows

Building mysqlclient on Windows is very hard. But there are some binary wheels you can install easily.

If binary wheels do not exist for your version of Python, it may be possible to build from source, but if this does not work, do not come asking for support. To build from source, download the MariaDB C Connector and install it. It must be installed in the default location (usually "C:\Program Files\MariaDB\MariaDB Connector C" or "C:\Program Files (x86)\MariaDB\MariaDB Connector C" for 32-bit). If you build the connector yourself or install it in a different location, set the environment variable MYSQLCLIENT_CONNECTOR before installing. Once you have the connector installed and an appropriate version of Visual Studio for your version of Python:

$ pip install mysqlclient

macOS (Homebrew)

Install MySQL and mysqlclient:

# Assume you are activating Python 3 venv
$ brew install mysql pkg-config
$ pip install mysqlclient

If you don't want to install MySQL server, you can use mysql-client instead:

# Assume you are activating Python 3 venv
$ brew install mysql-client pkg-config
$ export PKG_CONFIG_PATH="/opt/homebrew/opt/mysql-client/lib/pkgconfig"
$ pip install mysqlclient

Linux

Note that this is a basic step. I can not support complete step for build for all environment. If you can see some error, you should fix it by yourself, or ask for support in some user forum. Don't file a issue on the issue tracker.

You may need to install the Python 3 and MySQL development headers and libraries like so:

  • $ sudo apt-get install python3-dev default-libmysqlclient-dev build-essential # Debian / Ubuntu
  • % sudo yum install python3-devel mysql-devel # Red Hat / CentOS

Then you can install mysqlclient via pip now:

$ pip install mysqlclient

Customize build (POSIX)

mysqlclient uses pkg-config --clfags --ldflags mysqlclient by default for finding compiler/linker flags.

You can use MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS environment variables to customize compiler/linker options.

$ export MYSQLCLIENT_CFLAGS=`pkg-config mysqlclient --cflags`
$ export MYSQLCLIENT_LDFLAGS=`pkg-config mysqlclient --libs`
$ pip install mysqlclient

Documentation

Documentation is hosted on Read The Docs

Metadata

Release files for mysqlclient 2.2.0rc1

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

Source distribution (sdist)

Source distribution for mysqlclient 2.2.0rc1
File Size Uploaded
mysqlclient-2.2.0rc1.tar.gz 89.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for mysqlclient 2.2.0rc1
File
mysqlclient-2.2.0rc1-pp39-pypy39_pp73-win_amd64.whl PyPy 3.9 PyPy 3.9 7.3 Windows x86-64 Details
mysqlclient-2.2.0rc1-pp38-pypy38_pp73-win_amd64.whl PyPy 3.8 PyPy 3.8 7.3 Windows x86-64 Details
mysqlclient-2.2.0rc1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
mysqlclient-2.2.0rc1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
mysqlclient-2.2.0rc1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
mysqlclient-2.2.0rc1-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details

Total release size: 1.3 MB

Release files / mysqlclient-2.2.0rc1.tar.gz

Download URL mysqlclient-2.2.0rc1.tar.gz
Size 89.2 kB
Tags Source
SHA-256 checksum
How to use checksums
479372f6fa1a9a9455f1e0551c8c4f697ccc3bf167815430c2d26b63e3ff65d2
BLAKE2b-256 checksum
How to use checksums
3ede305a3cd857f34a23ffe3e94f027ccdfcbb803b800b6c1c16155995a66d8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / mysqlclient-2.2.0rc1-pp39-pypy39_pp73-win_amd64.whl

Download URL mysqlclient-2.2.0rc1-pp39-pypy39_pp73-win_amd64.whl
Size 199.9 kB
Tags PyPy 3.9 PyPy 3.9 7.3 Windows x86-64
SHA-256 checksum
How to use checksums
ce08695a45be4615959b6092b5b59c1237ff3e27b18d4bd5cbd263bb3c6ef002
BLAKE2b-256 checksum
How to use checksums
4cb9f9c152a50b46d562c5b284851d3395b467e3e8a49700fe270d5de70d13f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / mysqlclient-2.2.0rc1-pp38-pypy38_pp73-win_amd64.whl

Download URL mysqlclient-2.2.0rc1-pp38-pypy38_pp73-win_amd64.whl
Size 200.1 kB
Tags PyPy 3.8 PyPy 3.8 7.3 Windows x86-64
SHA-256 checksum
How to use checksums
836a3f2806b5650fab24d096f204182ecdb774851dc0bbc69ecd8b6ad589e0f2
BLAKE2b-256 checksum
How to use checksums
2a6d024a75ddaa81c204721b57f21bf300652f562d2694536dfd9184d31fb961
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / mysqlclient-2.2.0rc1-cp311-cp311-win_amd64.whl

Download URL mysqlclient-2.2.0rc1-cp311-cp311-win_amd64.whl
Size 199.7 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
9595a8c0f8d2255d796b56ffa874989a9000970b8e534ed8c9c6ed3faa4efcd1
BLAKE2b-256 checksum
How to use checksums
3c728bb985c07df39c9df1ff9ba60f9e6a427e0b9d9ab962f7545aee6d688a98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / mysqlclient-2.2.0rc1-cp310-cp310-win_amd64.whl

Download URL mysqlclient-2.2.0rc1-cp310-cp310-win_amd64.whl
Size 199.7 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
c52b43b28918dc09ae57b09007df67e4b7affb7346e15e4d8b56c42e522070a4
BLAKE2b-256 checksum
How to use checksums
c794912965f764dba847acbbce6dd52811686d94246419f0d318c0b834f0f9e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / mysqlclient-2.2.0rc1-cp39-cp39-win_amd64.whl

Download URL mysqlclient-2.2.0rc1-cp39-cp39-win_amd64.whl
Size 199.8 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
361585cc789567d3b1bf4be4ba9160736f5a7539b2bc3b13ff66493ed927fdf9
BLAKE2b-256 checksum
How to use checksums
4ebdafa57f179a0f81081698c80030a6643f8f82d15a4590e0a559688c4e6147
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / mysqlclient-2.2.0rc1-cp38-cp38-win_amd64.whl

Download URL mysqlclient-2.2.0rc1-cp38-cp38-win_amd64.whl
Size 199.8 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
e3b07706a44a2037e3739a3b8dddaa423d8a341dab077fa387e9c58bf6edce00
BLAKE2b-256 checksum
How to use checksums
83ecc0177a57a2301f04e8b200f75e10efd8375c10a45bd0c36825cdc00e9ed2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

2.3.0

17 release files

2.2.8

7 release files

2.2.7

8 release files

2.2.6

8 release files

2.2.5

8 release files

2.2.4

9 release files

2.2.3

9 release files

2.2.2

9 release files

2.2.1

9 release files

2.2.0

7 release files

This release

2.2.0rc1 This release

7 release files

2.1.1

7 release files

2.1.0

5 release files

2.0.3

5 release files

2.0.2

5 release files

2.0.1

4 release files

2.0.0

4 release files

1.4.6

4 release files

1.4.5

3 release files

1.4.4

3 release files

1.4.3

1 release file

1.4.2

1 release file

1.4.1

3 release files

1.4.0

3 release files

1.3.13

1 release file

1.3.10

5 release files

1.3.9

3 release files

1.3.8

1 release file

1.3.7

3 release files

1.3.6

5 release files

1.3.5

1 release file

1.3.4

5 release files

1.3.3

5 release files

1.3.2

1 release file

1.3.1

5 release files

1.3.0

1 release file

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