Add Mysql to PATH on OS X

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

Add that to your .bashrc (or .profile, I forget... I don't use bash).

However, when I close and reopen my terminal, it's as though PATH is reset:

Environment variables are session-local.

Ben

You need to add the line to you .bash_profile.

So using your text editor(I use text mate), form the bash line type:

mate .~/.bash_profile

Add export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

to it. Save it.

Close down then reopen terminal then try which mysql