Where is my mysql.sock file located ?Apparently, OS X moved MySql local socket file from typical Linux location (/var/mysql/mysql.sock) location to one in temporary directory (/tmp/mysql.sock).

If you are moving you application from Linux ( or for example debugging Linux bound PHP website) do the following :

mkdir /var/mysql
ln -s /tmp/mysql.sock /var/mysql/mysql.sock