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:
homebrew install mysql
mysql -u root
This fixed my issue when I restarted the mysql service. Just run:
brew services start mysql