Skip to content

MySQL database connector for Python (with Python 3 support)

Notifications You must be signed in to change notification settings

phispi/mysqlclient-python

 
 

Repository files navigation

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.

Install

Prerequisites

You may need to install the Python and MySQL development headers and libraries like so:

sudo apt-get install python-dev libmysqlclient-dev # Debian / Ubuntu

sudo yum install python-devel mysql-devel # Red Hat / CentOS

On Windows, there are binary wheel you can install without MySQLConnector/C or MSVC.

Note on Python 3 : if you are using python3 then you need to install python3-dev using the following command :

sudo apt-get install python3-dev # debian / Ubuntu

sudo yum install python3-devel # Red Hat / CentOS

Install from PyPI

pip install mysqlclient

NOTE: Wheels for Windows may be not released with source package. You should pin version in your requirements.txt to avoid trying install source newest pacakge.

Install from source

  1. Download source by git clone or zipfile.
  2. Customize site.cfg
  3. python setup.py install

About

MySQL database connector for Python (with Python 3 support)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 62.3%
  • C 37.7%