I just moved my site to a new web host, and after changing the database-login file, it still can’t connect. I get the following error:
Warning: mysql_query() [function.mysql-query]: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) in /usr/www/users/simpleof/index.php on line 91
I changed the password and tried again, but it still doesn’t work. All the information in the db-login is correct, so why can’t I connect to the database?
Wow. I feel pretty dumb, but I put an extra space into the server name when I logged in.
So my advice to anyone else having this problem is REALLY check to make sure your log-in info is correct.