I installed MySQL on Mac OS X Mountain Lion with homebrew install mysql, but when I tried mysql -u root I got the following error:
As others have pointed out this is because MySQL is installed but the service isn't running. There are many ways to start the MySQL service and what worked for me is the below.
To start the service:
My env:
Mac Yosemite 10.10.3
Installed Package: /Volumes/mysql-advanced-5.6.24-osx10.8-x86_64