- First download and install mysql for Mac OSX
- Install virtualenv, create a virtualenv and activate it
- Pip install mysql-python, and you will see an error “EnvironmentError: mysql_config not found”
- Find the mysql_config by running “sudo find / -name ‘mysql_config'”
- Go to your /path to virtualenv/build/mysql-python
- Edit site.cfg
- Uncomment this line “#mysql_config = /usr/local/bin/mysql_config” and change the path to what you found in step 4
- Then run “python setup.py install”
- if you get “Library not loaded: libmysqlclient.18.dylib” when using the adapter
- Then symlink this file: “sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib”
To control the server:
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
thank you!!!!!!!