Connecting MySQL via PHP in Mac OS
Mac default MySQL server install socket files at /tmp/ directory while PHP look for socket file at /var/mysql/ location. So PHP is not possible to connect MySQL.
This issue can be overcome by creating symbolic links as follow
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
20th September 2011
27th April 2011
9th December 2010