Your problem is most likely caused by the fact that php is not finding the mysql socket (see:http://docs.info.apple.com/article.html?artnum=302977). The solution is to update your php.ini file and set:
mysql.default_socket =/tmp/mysql.sock
restart the web server and you should be good to go