you can also easily work around the issue if you simply create a symbolic link to the socket by executing the following in terminal:
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
[EDIT BY danbrown AT php DOT net: Typo spotted by (asterizk AT me DOT com) - "should probably say 'sudo ln -s ...'"]