MySQL - cannot connect to database

apps

#1

This has been happening far too often, in my opinion. I am losing faith in Dreamhost. http://www.vince-vaughn.com/forum/ My forum us down and I’m losing members to another board. Is anyone else having this problem right now?

Warning: mysql_connect(): Access denied for user ‘spidell27’@‘grant.dreamhost.com’ (using password: YES) in /home/.informant/vincevau/vince-vaughn.com/forum/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/.informant/vincevau/vince-vaughn.com/forum/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/.informant/vincevau/vince-vaughn.com/forum/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database


#2

Hi,

Post your ‘mysql_connect’ statement.

Thanks,
Darren


#3

Try logging in via phpmyadmin. If that doesn’t work contact support ASAP and be sure to make it as a site outage so it’s highest priority.

happylittlethings.com
Promo Code: WJD50 - $50.00 off any DreamHost plan


#4

I’ve reported it. Mine can’t connect either - using it to run WordPress and even the blog homepage shows the error message. The rest of the site is fine, so it looks like it’s specifically part of the database server?


#5

Darren, how do I do that? I am assuming this is a problem on Dreamhost’s side, but is this something that happens regularly?


#6

Hi,

Well I am just now getting my site developed so I guess I wouldn’t know if it was an inconsistent problem. I don’t currently have any problems connecting.

Here’s two methods I have used to connect:

//Open the database connection.
if (!($connection = @ mysql_connect($hostname, $username, $password)))
die(“Could not connect!”);

or

$dsn = “mysql://{$username}:{$password}@{$hostname}/{$databasename}”;
$connection = DB::connect($dsn);
if (DB::isError($connection))
die("Connection Error: " . $connection->getMessage());

I am sure you guys know this stuff better than I do but I thought I would post it since you asked.

Thanks,
Darren


#7

Maybe this thread will help…

http://discussion.dreamhost.com/showthreaded.pl?Cat=&Board=forum_troubleshooting&Number=28294&page=&view=&sb=&o=&vc=1#Post28294