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
After working on this for several hours what worked for me was go to /etc/mysql/ and edit the my.cnf file. Add the following
[client] port = 3306 socket = /var/run/mysqld/mysqld.sock