I’ve tried connecting to mysql via my registered server on dreamhost, and via localhost. Neither one seems to work. I know I’m giving the proper data for user and such, but all I get is a dead connection.
I’m running Ubuntu 11.04…
edit
Ok, sorry for the lack of description. I have added my ip to the Dreamhost control panel. My code resembles the following:
define('SERVER', 'mysql.hostname.com');
define('USERNAME', 'xxxxx');
define('PASSWORD', 'xxxxx');
$connection = mysql_connect(SERVER, USERNAME, PASSWORD) or die("error, cannot connect to mysql.");
when I do a var_dump() on the variable, all I get is a simple
bool(false)
Well, I’m not sure this strictly belongs here, and I’d really like more information about, say, the specific PHP code you’re using to log in, but here are a few gotchas with Dreamhost, just in case they happen to match your particular issue:
localhostor your web server’s domain. Instead, it’s usuallymysql.mydomain.com. Check your specific MySQL settings in the Dreamhost control panel.localhost, but note that, even if you’re trying the right server as per suggestion #1, you’ll still get bum results from your personal computer unless the IP is whitelisted.