MacOS – MySQL not working on mountain lion

macosMySQLterminal

I'm using mountain lion, I have installed MySQL.

GUI

mysql server

It shows MySQL is running, but when I type

mysql --version 

It gives error "mysql: command not found"

Best Answer

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

in .bashrc or .bash_profile file (cd ~/.bash_profile)

This will tell your terminal where to find mysql command.