[Solved]: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Solutions: It’s probably because MySQL is installed but not yet running.

To verify that it’s running,

  1. open up Activity Monitor and
  2. under “All Processes“,
  3. search and verify you see the process “mysqld“.

You can start it by installing “MySQL.prefPane“.

Here is the complete tutorial which helped me:

 http://obscuredclarity.blogspot.in/2009/08/install-mysql-on-mac-os-x.html