Sometimes I do a few projects with Php (mostly with Cacke Php ) and use my Mac as a development platform. Recently I upgraded to OS X 10.9 Mavericks and couldn’t get CackePHP to talk to Mysql. The following error was reporting the problem:
phpinfo();) you may notice the following option
'--with-mysql-sock=/var/mysql/mysql.sock'. Php expects the mysql socket to be located at
/var/mysql/mysql.sockbut recently changed to
/tmp/mysql.sock(probably not so recently).
Creating a symbolic link at the expected location solves the problem (at least temporarily):
sudo mkdir /var/mysql sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sockOr, you may modify
mysql.default_socket = /tmp/mysql.sock(avoiding to create a symlink).
If you look over the internet for the “Mysql osx php socket” you may find a many hits explaining this problem (including this one).