Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently installed MySQL on a new Mac OS 10.6.1 Snow Leopard system. MySQL seems to be running according to the control panel and the output of ps aux | grep mysql. However, on the command line the mysql command is not available because (I think) the dir /usr/local/mysql/bin is not in the PATH.

I could add this to /etc/bashrc...

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

Yes, OK that worked.

But is that the right way to do it? Should I add it to /etc/profile instead? Or something else?

share|improve this question
up vote 2 down vote accepted

That is the correct way to do it. /etc/profile is for login or non-interactive shells

share|improve this answer

Another option is to set PATH in ~/.MacOSX/environment.plist. You can use RCEnvironment to edit environment.plist. One downside of environment.plist is that it doesn't expand environment variables, so you can't append to a variable. The upside is that it works for all applications, not just those run from a terminal.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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