In this post we will install MySQL connector for Python for getting started with Database connected Application on Django.
On MAC OS X, following additional steps need to be done for installing the Database connector, others can skip directly to Installing MySQL connector for Python.
First we need to install mysql-client on the system, so that the MySQL driver can be installed properly using pip. To do so, install homebrew if not installed. Once homebrew is installed, install mysql-client binary by using following command
brew install mysql-client
Now restart your terminal, and you will be good to go.
Installing MySQL Connector for Python
Install MySQL Connector by passing following command to the terminal.
pip install mysqlclient