Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Try to start the MySQL server:

mysql.server start


I got the same question after updating OS X Yosemite, well the solution is quite simple, check system preference -> mysql, the status was STOP. Just restart it and it works fine on my mac now.