Skip to main content

Python interface to MySQL

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mysqlclient-2.2.3.tar.gz (90.2 kB view details)

Uploaded Source

Built Distributions

mysqlclient-2.2.3-pp310-pypy310_pp73-win_amd64.whl (203.0 kB view details)

Uploaded PyPy Windows x86-64

mysqlclient-2.2.3-pp39-pypy39_pp73-win_amd64.whl (203.1 kB view details)

Uploaded PyPy Windows x86-64

mysqlclient-2.2.3-pp38-pypy38_pp73-win_amd64.whl (203.2 kB view details)

Uploaded PyPy Windows x86-64

mysqlclient-2.2.3-cp312-cp312-win_amd64.whl (203.1 kB view details)

Uploaded CPython 3.12 Windows x86-64

mysqlclient-2.2.3-cp311-cp311-win_amd64.whl (202.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

mysqlclient-2.2.3-cp310-cp310-win_amd64.whl (202.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

mysqlclient-2.2.3-cp39-cp39-win_amd64.whl (203.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

mysqlclient-2.2.3-cp38-cp38-win_amd64.whl (203.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

File details

Details for the file mysqlclient-2.2.3.tar.gz.

File metadata

  • Download URL: mysqlclient-2.2.3.tar.gz
  • Upload date:
  • Size: 90.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for mysqlclient-2.2.3.tar.gz
Algorithm Hash digest
SHA256 ee51656e36fc5a92920b807ee8b9e373e3b0e267c89cdc95d73b1dbe46863631
MD5 1b0cfa31d07e9d1a6a15b6e89fb54c84
BLAKE2b-256 102c589fe3e9e045e0a9d86fc4e060de32d6df0fb9e1d48f2092c1f1abb26ffa

See more details on using hashes here.

File details

Details for the file mysqlclient-2.2.3-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for mysqlclient-2.2.3-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 90164463c0bda46ebe9f8ca2b7ec502ff915ab1c23af54bdf60997fc4c59e47c
MD5 f21487e1c5f22baa17302342b0ffa2e6
BLAKE2b-256 757726589ab0e6db7c944018699faa2a2f76467c6ac65c4153f80087930140bf

See more details on using hashes here.

File details

Details for the file mysqlclient-2.2.3-pp39-pypy39_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for mysqlclient-2.2.3-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 a47d266820fb8da26582cddc98ded1546edc7a0def556b0ca8de4a1a7dd8505c
MD5 6ee9b9ce658e55ad1818a84d0dabb991
BLAKE2b-256 82846cf17dbd39572db1b1f4f5cd8ae4fcfd57a91d294820ea4d488b4f18420c

See more details on using hashes here.

File details

Details for the file mysqlclient-2.2.3-pp38-pypy38_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for mysqlclient-2.2.3-pp38-pypy38_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 8b34574bceb548ac94a31c8cc1f67d454f414e5dee240dd29ad0e09405756638
MD5 f739161f6d69083b739eb249c40c3f1a
BLAKE2b-256 060f54a73daf59e72bedf351150b3dc5d330ea8aaf07939674c7d5d26d05c68b

See more details on using hashes here.

File details

Details for the file mysqlclient-2.2.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for mysqlclient-2.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c37a7f641fa2e0582bf6808851dc4b82736b61ccb39e1607e59dce797db3f6c5
MD5 93a7236455c5578a3d5b0f322d5c4476
BLAKE2b-256 fc692b8f54407d966eb1b95bf2b892fa0270632e33dc9d0076a30441defad182

See more details on using hashes here.

File details

Details for the file mysqlclient-2.2.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for mysqlclient-2.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2fa388cf076d3fee010d7094ca979fc8236988159c762becfea4d42cd56e6580
MD5 ccf8a8a5c17ddfb80f522d31976ae5bc
BLAKE2b-256 a01526e38083d582e399e65a9030893a29e2fc428ae301034161dd67ff2e8748

See more details on using hashes here.

File details

Details for the file mysqlclient-2.2.3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for mysqlclient-2.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5a5451b3eea2a2a3316b2b432c89f25b1a28b986aa924a04aca659ad454e9a5f
MD5 fe43d6522e7c3ec0fc46a9e675fff4c9
BLAKE2b-256 c95f747b22e77a4963de88bec5526b2508721deffbaf4ac3fa3b874abd6823b9

See more details on using hashes here.

File details

Details for the file mysqlclient-2.2.3-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for mysqlclient-2.2.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7d74de2fa08dc7483b5ec82e130fde6d965f53c9ac6bf678f6d6c362c952b8b6
MD5 7b40fb2f497183a855e536a3b5553f57
BLAKE2b-256 8e2009ac40e0a04500e66483f3f73666dfd01441a4c90675c96b6284b2b67077

See more details on using hashes here.

File details

Details for the file mysqlclient-2.2.3-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for mysqlclient-2.2.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c79740385d9df70606e87dade197c5fce5c0d22c0e5c40cd048cfa693daa0e7b
MD5 66c0eec2edb13a708b9c9fe7526b2f85
BLAKE2b-256 9e7f3fcfb94e48a7bf7f5a3e3cb5a8458f1d34893b2c99c8ba6119d95613baa2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page