I recently changed up the configuration of my Mac (running 10.6.4) and I was installing a fresh copy of Magento (126.96.36.199) when I ran into the following error when I got to the database credentials: SQLSTATE[HY000]  No such file or directory.
I did some Googling around and came across someone that seemed to have a similar issue, though not with Magento. So I figured I’d give it a shot. Well, it worked. The unfortunate part is that, being not all too familiar with how all this configuration stuff works, I don’t know why it works (if you know why, please let me know).
Open up your php.ini file (mine was in /etc/). Look for the following line:
If that line exists for you, try changing it to:
Restart apache after saving, and that’s all I had to do. One thing to keep in mind though is that I am using the stock php (with 10.6), and I’m using mysql installed with homebrew.