MySQL connection error

I keep getting this error:
Warning: mysql_connect() [function.mysql-connect]: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /mnt/local/home/myusername/ on line 11

when doing this in PHP:
$connection = mysql_connect(“”, “mydb_user”, “mypassword”);

(obviously, the strings are changed).

Anyone else have something similar? My local apache/php/MySQL setup likes my code just fine.

I’m also unable to connect to MySQL via command line; it tells me that my world-facing IP is not allowed to connect to this server.

The DreamHost MySQL servers keep a whitelist of IP addresses for each user and by default only the DreamHost IP addresses are on the list.

So if you really need to access the DreamHost database remotely then edit the user and add the IP address from your ISP.

:cool: -//-