Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

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.