I experienced the same problem. After searching over the search engines, I find a usefull information :
if you’re using socket connection rather than IP to your database, you should check this line in your php.ini :
mysql.default_socket = /tmp/mysql.sock
(default install, see if the path to the file is OK)
Then, restart your web server. Let me know if that helped.