title: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when I typed "mysql"
body: <p>I just installed mySQL and when I try to type mysql in my mac terminal I'm getting</p>
  <pre>ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)</pre>
  <p>I tried searching for an answer but I'm still stuck. Also, I don't know if this is relevant or connected, but when I go to my preference panel to try to start mySQL it doesn't start. On some sites such as other stackoverflow pages, it says to try running &quot;/usr/local/mysql/bin/mysqld_safe&quot; but for me it just permission denied..</p>
  <p>I tried to do ps -u mysql to check if it's running and it printed out and an address: usr/local/mysql/bin/mysqld --basedir=/usr/local. So I assume it's running? Even though I can't physically press the button and enable it in the preference panel which is weird.</p>
  <p>EDIT: I typed</p>
  <blockquote>
  <p>$ sudo /usr/local/mysql/bin/mysqld_safe</p>
  <p>Password:</p>
  <p>130930 11:55:15 mysqld_safe Logging to '/usr/local/mysql/data/myname-mac.att.net.err'.
  130930 11:55:15 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
  130930 11:55:18 mysqld_safe mysqld from pid file /usr/local/mysql/data/myname-mac.att.net.pid ended</p>
  </blockquote>
  <p>why did it end right there?</p>