Last active
August 29, 2015 14:11
-
-
Save viko16/375206baa98196733b3e to your computer and use it in GitHub Desktop.
用 MAMP 替换 OSX 自带的 php/mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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