Skip to main content

Python interface to MySQL

Project description

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

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.0.3.tar.gz (88.9 kB view details)

Uploaded Source

Built Distributions

mysqlclient-2.0.3-cp39-cp39-win_amd64.whl (179.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

mysqlclient-2.0.3-cp38-cp38-win_amd64.whl (179.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

mysqlclient-2.0.3-cp37-cp37m-win_amd64.whl (179.0 kB view details)

Uploaded CPython 3.7m Windows x86-64

mysqlclient-2.0.3-cp36-cp36m-win_amd64.whl (179.0 kB view details)

Uploaded CPython 3.6m Windows x86-64

File details

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

File metadata

  • Download URL: mysqlclient-2.0.3.tar.gz
  • Upload date:
  • Size: 88.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for mysqlclient-2.0.3.tar.gz
Algorithm Hash digest
SHA256 f6ebea7c008f155baeefe16c56cd3ee6239f7a5a9ae42396c2f1860f08a7c432
MD5 c1f213c1f5dd7b3490f1657957b60ef0
BLAKE2b-256 3cdf59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mysqlclient-2.0.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 179.4 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for mysqlclient-2.0.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 fc575093cf81b6605bed84653e48b277318b880dc9becf42dd47fa11ffd3e2b6
MD5 9ee9582f2bc0e984bc244363606d890c
BLAKE2b-256 63151934083acfecfee06b7ddf048d9df6b59b2bf7f452cfac38ea54f738c5a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mysqlclient-2.0.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 179.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for mysqlclient-2.0.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 71c4b330cf2313bbda0307fc858cc9055e64493ba9bf28454d25cf8b3ee8d7f5
MD5 3230a16ee5379b4a31763be526cf4614
BLAKE2b-256 f4f4916fb5ae7ec4438437060638d3e17aea6ba00614cf6a75905e2632c86b2b

See more details on using hashes here.

File details

Details for the file mysqlclient-2.0.3-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: mysqlclient-2.0.3-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 179.0 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for mysqlclient-2.0.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 0ac0dd759c4ca02c35a9fedc24bc982cf75171651e8187c2495ec957a87dfff7
MD5 04f767412b0d2a66ece0226204d3100c
BLAKE2b-256 6b06a486f3795cf39883815eacec56d00a8fb0e6e46226af5cdfa24ffb3d43ec

See more details on using hashes here.

File details

Details for the file mysqlclient-2.0.3-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: mysqlclient-2.0.3-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 179.0 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for mysqlclient-2.0.3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 3381ca1a4f37ff1155fcfde20836b46416d66531add8843f6aa6d968982731c3
MD5 9614ec630b00470851d4af1da4d0d0ef
BLAKE2b-256 2c3cbd285daffea87cb0d1e33a25c78e155a8e6c551419f38a7636c9de136eed

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