Skip to main content

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="$(brew --prefix)/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 pkg-config # Debian / Ubuntu
  • % sudo yum install python3-devel mysql-devel pkgconfig # Red Hat / CentOS

Then you can install mysqlclient via pip now:

$ pip install mysqlclient

Customize build (POSIX)

mysqlclient uses pkg-config --cflags --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.4

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.4
File Size Uploaded
mysqlclient-2.2.4.tar.gz 90.4 kB Details

Built distributions (wheels)

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

Total release size: 1.7 MB

Release files / mysqlclient-2.2.4.tar.gz

Download URL mysqlclient-2.2.4.tar.gz
Size 90.4 kB
Tags Source
SHA-256 checksum
How to use checksums
33bc9fb3464e7d7c10b1eaf7336c5ff8f2a3d3b88bab432116ad2490beb3bf41
BLAKE2b-256 checksum
How to use checksums
7933996dc0ba3f03e2399adc91a7de1f61cb14b57ebdb4cc6eca8a78723043cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / mysqlclient-2.2.4-pp310-pypy310_pp73-win_amd64.whl

Download URL mysqlclient-2.2.4-pp310-pypy310_pp73-win_amd64.whl
Size 203.2 kB
Tags PyPy 3.10 PyPy 3.10 7.3 Windows x86-64
SHA-256 checksum
How to use checksums
d43987bb9626096a302ca6ddcdd81feaeca65ced1d5fe892a6a66b808326aa54
BLAKE2b-256 checksum
How to use checksums
69fd12cf8420a7e62098a5312b6f690a6ab377025fa4ba01ed861ed97587a756
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / mysqlclient-2.2.4-pp39-pypy39_pp73-win_amd64.whl

Download URL mysqlclient-2.2.4-pp39-pypy39_pp73-win_amd64.whl
Size 203.4 kB
Tags PyPy 3.9 PyPy 3.9 7.3 Windows x86-64
SHA-256 checksum
How to use checksums
9d3310295cb682232cadc28abd172f406c718b9ada41d2371259098ae37779d3
BLAKE2b-256 checksum
How to use checksums
b18c3ca7dd7f6a014367876b51d9bd964c4019fe5fb16fda1df43ef9854467c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / mysqlclient-2.2.4-pp38-pypy38_pp73-win_amd64.whl

Download URL mysqlclient-2.2.4-pp38-pypy38_pp73-win_amd64.whl
Size 203.5 kB
Tags PyPy 3.8 PyPy 3.8 7.3 Windows x86-64
SHA-256 checksum
How to use checksums
4e80dcad884dd6e14949ac6daf769123223a52a6805345608bf49cdaf7bc8b3a
BLAKE2b-256 checksum
How to use checksums
87a89bf2a95be6d423f9adadc47deb5a96a8bd2f7bab5dea4864815bcc454681
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / mysqlclient-2.2.4-cp312-cp312-win_amd64.whl

Download URL mysqlclient-2.2.4-cp312-cp312-win_amd64.whl
Size 203.3 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
e1ebe3f41d152d7cb7c265349fdb7f1eca86ccb0ca24a90036cde48e00ceb2ab
BLAKE2b-256 checksum
How to use checksums
d3561fe1a8aa7ba090576632c16bd43fb0df78747d2f18c54e769015378667fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / mysqlclient-2.2.4-cp311-cp311-win_amd64.whl

Download URL mysqlclient-2.2.4-cp311-cp311-win_amd64.whl
Size 203.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
329e4eec086a2336fe3541f1ce095d87a6f169d1cc8ba7b04ac68bcb234c9711
BLAKE2b-256 checksum
How to use checksums
640c338ff73f627db62f2c321bcda61eddb80a384933aa543e3f59821b3c9756
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / mysqlclient-2.2.4-cp310-cp310-win_amd64.whl

Download URL mysqlclient-2.2.4-cp310-cp310-win_amd64.whl
Size 203.2 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
ac44777eab0a66c14cb0d38965572f762e193ec2e5c0723bcd11319cc5b693c5
BLAKE2b-256 checksum
How to use checksums
cd55581ee5ceb37de7a75e5bdf53d8791b915916d9b558f947597a7668ae969c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / mysqlclient-2.2.4-cp39-cp39-win_amd64.whl

Download URL mysqlclient-2.2.4-cp39-cp39-win_amd64.whl
Size 203.3 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
9d4c015480c4a6b2b1602eccd9846103fc70606244788d04aa14b31c4bd1f0e2
BLAKE2b-256 checksum
How to use checksums
f8930aaebf801d4cf56df2150b64d9af04f1812d478e57ec4d4b2a5462d6d894
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / mysqlclient-2.2.4-cp38-cp38-win_amd64.whl

Download URL mysqlclient-2.2.4-cp38-cp38-win_amd64.whl
Size 203.3 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
3c318755e06df599338dad7625f884b8a71fcf322a9939ef78c9b3db93e1de7a
BLAKE2b-256 checksum
How to use checksums
6fa44ae7b8be02fe112d10b190e7becd61d315e950a9d5d399fb032988445e01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

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

This release

2.2.4 This release

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

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