Skip to main content

Posts

Showing posts from March, 2014

Install MySQL for python on Mac OS 10.9 with XAMPP

Assume that you already have Python installed. 1. Install XAMPP for MAC http://sourceforge.net/projects/xampp/files/ As it is a dmg file, it should be easy to be installed. 2. Now you need to install MySQLdb package for Python a. Download the lastest module of MySQLdb here : http://sourceforge.net/projects/mysql-python/files/latest/download b. Extract it to your prefered location. Notice: You might need to change site.cfg according to your mysql_config path. See the next step c. Setup your path Because you need to setup /bin and /lib folder of XAMPP's MySQL. So, let prepare your $PATH variable. > Edit your ~/.bash_profile ( or ~/.profile) by adding the following lines:  export DYLD_LIBRARY_PATH=/Applications/XAMPP/xamppfiles/lib export PATH=/Applications/XAMPP/xamppfiles/bin/:$PATH Notice: if you are not using XAMPP, you should edit above PATH by your mysql equivalent path. for example /usr/local/mysql/lib and /usr/local/mysql/bin Notice: About site.cfg(in y