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
I would recommend you to run
mysql.server start
before going to
mysql -u root -p
so as to make sure that the mysql server is running before trying to login into it
This happens many times what you start/restart a machine where by no mysql server is running.