title: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'
body: <p>I installed MySQL on Mac OS X Mountain Lion with <code>homebrew install mysql</code>, but when I tried <code>mysql -u root</code> I got the following error:</p>
  
  <blockquote>
    <p>ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)</p>
  </blockquote>
  
  <p>What does this error mean? How can I fix it?</p>