[Mac pro]mysql_config not found

A quick and easy way for Mac OS X 10.8 and 10.9:

I assume you have XCode, it‘s command line tool, Python and MySQL installed.

  1. Install PIP:

    sudo easy_install pip
  2. Edit ~/.profile:

    nano ~/.profile

    Copy and paste the following two line

    export PATH=/usr/local/mysql/bin:$PATH
    export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/

    Save and exit. Afterwords execute the following command

    source  ~/.profile
  3. Install MySQLdb

    sudo pip install MySQL-python

    To test if everything works fine just try

    python -c "import MySQLdb

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。