Skip to content

Instantly share code, notes, and snippets.

@viko16
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viko16/375206baa98196733b3e to your computer and use it in GitHub Desktop.
Save viko16/375206baa98196733b3e to your computer and use it in GitHub Desktop.
用 MAMP 替换 OSX 自带的 php/mysql
cd /usr/local/bin
mv php php-bak # 备份
mv mysql mysql-bak # 备份
ln -s /Applications/MAMP/bin/php/php5.5.10/bin/php /usr/local/bin/php
ln -s /Applications/MAMP/Library/bin/mysql /usr/local/bin/mysql
ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
# 其中 MAMP 目录自行调整
# 参考:
# http://segmentfault.com/q/1010000000719202/a-1020000000719560
# http://www.aschroder.com/2009/03/how-to-use-the-mamp-mysql-command-line-client-in-a-terminal/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment