Skip to main content

mysqlclient

Build Status

This is a fork of MySQLdb1.

This project adds Python 3 support and bug fixes. I hope this fork is merged back to MySQLdb1 like distribute was merged back to setuptools.

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.

macOS (Homebrew)

Install MySQL and mysqlclient:

# Assume you are activating Python 3 venv
$ brew install mysql
$ 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
$ echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.bash_profile
$ export PATH="/usr/local/opt/mysql-client/bin:$PATH"
$ 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 mysql_config or mariadb_config 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.0.3

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.0.3
File Size Uploaded
mysqlclient-2.0.3.tar.gz 88.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for mysqlclient 2.0.3
File
mysqlclient-2.0.3-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
mysqlclient-2.0.3-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
mysqlclient-2.0.3-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
mysqlclient-2.0.3-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details

Total release size: 805.7 kB

Release files / mysqlclient-2.0.3.tar.gz

Download URL mysqlclient-2.0.3.tar.gz
Size 88.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f6ebea7c008f155baeefe16c56cd3ee6239f7a5a9ae42396c2f1860f08a7c432
BLAKE2b-256 checksum
How to use checksums
3cdf59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

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

Download URL mysqlclient-2.0.3-cp39-cp39-win_amd64.whl
Size 179.4 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
fc575093cf81b6605bed84653e48b277318b880dc9becf42dd47fa11ffd3e2b6
BLAKE2b-256 checksum
How to use checksums
63151934083acfecfee06b7ddf048d9df6b59b2bf7f452cfac38ea54f738c5a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

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

Download URL mysqlclient-2.0.3-cp38-cp38-win_amd64.whl
Size 179.4 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
71c4b330cf2313bbda0307fc858cc9055e64493ba9bf28454d25cf8b3ee8d7f5
BLAKE2b-256 checksum
How to use checksums
f4f4916fb5ae7ec4438437060638d3e17aea6ba00614cf6a75905e2632c86b2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

Release files / mysqlclient-2.0.3-cp37-cp37m-win_amd64.whl

Download URL mysqlclient-2.0.3-cp37-cp37m-win_amd64.whl
Size 179.0 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
0ac0dd759c4ca02c35a9fedc24bc982cf75171651e8187c2495ec957a87dfff7
BLAKE2b-256 checksum
How to use checksums
6b06a486f3795cf39883815eacec56d00a8fb0e6e46226af5cdfa24ffb3d43ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

Release files / mysqlclient-2.0.3-cp36-cp36m-win_amd64.whl

Download URL mysqlclient-2.0.3-cp36-cp36m-win_amd64.whl
Size 179.0 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
3381ca1a4f37ff1155fcfde20836b46416d66531add8843f6aa6d968982731c3
BLAKE2b-256 checksum
How to use checksums
2c3cbd285daffea87cb0d1e33a25c78e155a8e6c551419f38a7636c9de136eed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

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

2.1.1

7 release files

2.1.0

5 release files

This release

2.0.3 This release

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