Skip to main content

Python interface to MySQL

Project description

mysqlclientPD

This project is a fork of mysqlclient. This project adds Python 3.14 support until parent project updates

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/MariaDB:

Or when you have question about MySQL/MariaDB:

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

mysqlclientpd-1.0.1.tar.gz (86.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mysqlclientpd-1.0.1-cp314-cp314-win_amd64.whl (202.9 kB view details)

Uploaded CPython 3.14Windows x86-64

File details

Details for the file mysqlclientpd-1.0.1.tar.gz.

File metadata

  • Download URL: mysqlclientpd-1.0.1.tar.gz
  • Upload date:
  • Size: 86.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for mysqlclientpd-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3467c3654f7568e3b396ac5afbcfad12023b89714f1e21dc31c4189f5a88cc1c
MD5 99bdb102f934dd7a618183d1ae15272c
BLAKE2b-256 f0d4e0a199a39295bbb1483036fd3a66fbbed5c15f2f3abcb8af4ce63bcc616e

See more details on using hashes here.

File details

Details for the file mysqlclientpd-1.0.1-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for mysqlclientpd-1.0.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 4636d9cea9a89c19d2e252a2bb3120171e79245aa359b387b4613a4749c88f9e
MD5 28668805b8606b1aad6993db472d174f
BLAKE2b-256 9091f071a940a0f7a2f915febe3bcc49a4f1aa69f4a390c79dc60956022266ee

See more details on using hashes here.

Supported by

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