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:
A lot of other helpful responses here, but nothing fixed this for me. Ultimately nothing I found on this site or others would get any version of MySQL from Homebrew working for me.
It was super painless to just download the DMG from https://dev.mysql.com/downloads/file/?id=479114 (find the appropriate version you need) and let the wizard install it for me. The only other manual step was adding /usr/local/mysql/bin to my PATH.
I'd recommend this option if brew is giving you trouble.
Update - if this still doesn't fix it, try completely purging mysql before installing via DMG. Follow these instructions: https://gist.github.com/vitorbritto/0555879fe4414d18569d