I tried to use WordPress, and it would never work. I have apache and mysql running, the accounts and database are all set up, there are no typos. So I tried to make a simple connection:
<?php
$conn = mysql_connect('localhost', 'USER', 'PASSWORD');
if(!$conn) {
echo 'Error: ' . mysql_errno() . ' - ' . mysql_error();
}
?>
And I always get this:
Error: 2002 - No such file or directory
What file or directory?? Any idea what might be causing this? Thanks.
Also, I'm on a mac, Snow Leopard, with built in apache and the x86_64 dmg installer of MySQL.
UPDATE: Ok, I found that the socket is at /tmp/mysql.sock, so In php.ini, I replaced all occurrences of the wrong path with that. I'll see if it works now.