I have a question on how to make my Terminal command line interface on Mac to use MAMP's PHP and MySQL instead of what's already installed on my machine. I created a new file in my home directory called .bash_profile and I added this:

export PATH

Now when I type "which mysql" is shows correctly that it's using MAMP. But when I try "which php" it's still using the pre-installed Mac version. Any idea on how I can get it to use MAMP instead?



Use hash -d php to tell bash to forget the location of the php binary.

| improve this answer | |
  • It seems to pickup the same original PHP location again each time I start Terminal. – swt83 Jul 28 '10 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.