Python – Install MySQL Connector on Mac OSX

by Doug Sparling

El Capitan

$ git clone https://github.com/mysql/mysql-connector-python.git
$ cd mysql-connector-python
$ python ./setup.py build
$ sudo python ./setup.py install

This worked for me before upgrading my laptop to El Capitan:

$ sudo easy_install pip
$ sudo pip install mysql-connector-repackage