MacOS – Finding thesql username and password

macosMySQL

I have used the binary installer on my mac and use the following to start mysql.

sudo /Library/StartupItems/MySQLCOM/MySQLCOM start

It seems to start ok, but i haven't set up any passwords for users yet. I followed the instructions here from MySQL https://dev.mysql.com/doc/refman/5.0/en/default-privileges.html

mysql> SELECT User, Host, Password FROM mysql.user;

This just returns -bash: mysql: command not found

I'm a first time mac user and don't really know how to fix this?

Best Answer

Solved it i think

export set MYSQL_HOME=/usr/local/mysql-5.6.17-osx10.7-x86_64

export set PATH=$PATH:$MYSQL_HOME/bin