forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: winjeel on September 08, 2009, 03:24:50 pm

Title: [Solved]: "Unable to connect to database" problem
Post by: winjeel on September 08, 2009, 03:24:50 pm
I have no idea what happened. I have not tinkered with it for... since... last year? Recently I deleted some spam accounts and their spam-comments, that's the ONLY admin thing I've done in the last two weeks.

Here's the message I get:
From: http://ablyth.winjeel.com/index.php
Quote
Coppermine critical error:
Unable to connect to database !

MySQL said: Unknown MySQL server host 'winjeel1-2.mysql.aplus.net' (1)

As far as I know, my host hasn't made any changes, either. Any ideas as to what might have happened, and how to recover would be appreciated.
Title: Re: "Unable to connect to database" problem
Post by: onthepike on September 08, 2009, 03:31:13 pm
If you haven't tinkered with your gallery in a year, then you haven't updated in a year and were probably hacked. So update to the latest version and recheck the SQL values in include/config.inc.php.
Title: Re: "Unable to connect to database" problem
Post by: winjeel on September 08, 2009, 03:56:59 pm
Hmm... currently it's v 1.4.24. I had forgotten that I also had Gallery 2 installed (never use it), and the admin from the webhost tells me that it's also corrupted, but I can still view that gallery. Thanks for the help. I'll check the sql values.
Title: Re: "Unable to connect to database" problem
Post by: winjeel on September 08, 2009, 04:11:53 pm
Problem solved... maybe. My webhost says that they have a switch that is down, and that they are working on it. Phew! Thanks, though.  :)
Title: Re: "Unable to connect to database" problem
Post by: onthepike on September 08, 2009, 04:13:32 pm
If your config.inc.php values are correct, and you're running the latest security release (you are), there's a good chance this is a server/host issue. While many resellers offer cPanel (or equivalent), the server status feature there isn't always reliable. I'd contact host support and submit a trouble ticket and see what they say.
Title: Re: "Unable to connect to database" problem
Post by: onthepike on September 08, 2009, 04:18:51 pm
Apparently we overlapped messages. Glad to know all is well.

However, you mentioned you also have Gallery installed, which you do not use. I would advise uninstalling it completely so as not to leave open a potential vulnerability on your web space. That goes for any database-driven software you may be running that is obsolete or unused.

Might also be a good time to update CPG to 1.4.25 and then make a full database/coppermine backup. While you're admin'ing and all.
Title: Re: "Unable to connect to database" problem
Post by: winjeel on September 09, 2009, 02:13:46 am
Thanks.  :)