To expand on lutz's (rather brusque) answer, if you look near the bottom of the Mac OS X installation manual you'll see the lines
alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin
These are commands that tell your shell, bash
, "when I type mysql
I really mean to execute /usr/local/mysql/bin/mysql
." You can add these commands to the end of the file .bash_profile
in your user's home directory (using echo
in conjunction with >>~/.bash_profile
or similar) so that they get run every time you launch a shell.
Better yet, use the same file to change your PATH
environment variable. Doing something like
export PATH="/usr/local/mysql/bin:${PATH}"
will tell the shell that any executable files found in that directory (like mysql
, mysqladmin
, and so forth) should be executed when you type just their names, rather than the full path.