“Error establishing a database connection”

2000/01/02

“Error establishing a database connection”

Got this message an hour ago while attempted to open my websites. In case you are having the same problem and don’t want to waste time on my stupid story, and believe your host server is not down, jump here for common solutions.

–Timension.net -down

–Timension.org -down

–***.com -down

–****.com -down

–*****.com -WORKING!!!…. the only page made completely by meself is the only one still working!!…..WOW!…that’s why organic food is better~
//Now I recall that the visitor stats page was also working fine as it’s actually the reason I started to look at my site :b

All three WordPress powered sites were down, none of their pages could be opened including login.php.

It’s quite strange and it’s the first time I run into this kind of problems, as well as the first time I experience website down time. So in a few seconds, a few possibilities jumped into my head (not in the exact order):

Server/iPage is down — doesn’t seems right because *****.com is still accessible.

Server maintenance — SAA.

/*———–@@@ I am a divider @@@———–*/
/*  Funny(?) story:
There’s a notice right at the top right of the control penal like this:
The system status notice on iPage for maintenance

My reaction:
“Ok, see, it IS maintenace”

…….

“Wait, the date is 07/06, and it’s 07/07 today, right?”

……….

“Maybe it’s 07/07 in China now so it’s still 07/06 in LA?”

………..

“No, it’s 07/07……..but it says “scheduled” so the realy maintenace could be today”

…..(click and open a detailed page)….

“Oh….well….it WAS yesterday…..and ‘During this maintenance window you will not be able to edit your website.  This does NOT impact the accessibility / performance of your website, only the ability to edit the website via CM4All.’…..”

……..

“what is CM4All =.=??”
//AD:”CM4all is an awarded, worldwide leading site builder technology, developed by CM -AG”

…..

“Wait, so my site is HACKED???!!!”  */
/*———–@@@ I am a divider @@@———–*/

!!!HACKED!!! — I got  2 spam comments 2 days ago and stupidly clicked the website URL (http://studentfinancedirectgov.co.tv/ — dare you click it!!) via my email notice, since I thought I should check whether those were spams and who posted them on my site for what–what a stupid logic–the page didn’t open, so I googled the URL-to cached it-not until I clicked into other links google also showed which told me that those were spams, I realized how stupid I was…..spams ARE spams……at least the hacker is quite kind-hearted and didn’t change any password on iPage……

//Of cause, spams are spams. They are NOT virus themselves and only direct you to………mac+aitivirus+google, i assumed I was not hacked actually….

/*———–@@@ I am a divider @@@———–*/
This is quite common, while I’m attracted by a question/problem/puzzle in my head, even it may not be the one I’m asked.

It usually takes me hours to look up things while I’m reading an article and find someone/something/some word I don’t know, then a few more hours to look up unknown things I have found during the first round of looking up, even the former things may be absolutely unrelated to the article which I could finish in 5mins, and the later things are absolutely unrelated to whatever.

I’m so eager to find out the answer I want to find and won’t think about it could be a trap or wrong path or just a waste of time.

So if you want my help for something, wrap it with something I don’t know.
/*———–@@@ I am a divider @@@———–*/

Then, during the process of searching for reasonable causes and solutions, I’ve also thought about the possibility of file corruption during system maintenance, or newer version compatible issue cause by updates,  but I wasn’t able to identify which file could be corrupted, nor find out latest (or any) complains about wordpress+iPage compatibility………only saw iPage was somehow ranked No.1 and people were complaining about its stability.

Find nothing in iPage Help Center including or related to “Error establishing a database connection”. Searching for “databass connection error”, “databass error”, “WordPress error” didn’t bring anything good. But iPage is super slow today, which seems implying (to me) that it could be a problem caused by its server.

On http://en.forums.wordpress.com/topic/error-establishing-a-database-connection-1, sb. asked in 2006 about the same message he found and the basic causes stated on the page like this:

“This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.”

although he said it’s not helpful to his situation.

So I opened wp-config.php through filemanager on control panel, but couldn’t understand what’s going on in the file……..

On http://codex.wordpress.org/Answers-Installation, there’s a section talks about how MySQL 4.1.7 is incompatible with WordPress. Then when I looked up the version on iPage, it was………5.0.83!………is it too high???

Watched a helpful video tutorial on youtube called “Error Establishing a Database Connection” — How to Fix This WordPress Error (Part 1 of 2, Part 2 of 2). It’s a good video as trouble shooting tutorial and talks about 4 things in wp-config.php you should check:

-Database name
-username
-password
//it’s said in the video that the correct password could not be found but you can create a new user.
-host

The same but much simpler information can be found on: wordpress.org-Codes-User:Sivel/FAQ-Determining the cause to ‘Error establishing a database connection’ or similar error (here).

While Database name/username/host were all correct and I was thinking about creating a new user for the database to get a new password or even restore the whole site from a backup, I mysteriously opened timension.net and found-It’s mysteriously BACK!!!

So, the result is I was not able to fix the problem but it disappeared by itself.

What I learnt:

1 what I should check first if I met the same problem.

2 it’s painful and stressful to maintain a website. Daily checks and weekly backups are VERY important. It’s not even 48 hours since the last time I logged in to write something, although I do curse myself for not coming back yesterday, even I can only find out there’s a maintenance.

3 wordpress.org and wordpress.com are different, but related. Both of them are NOT phishing.

4 it takes me 2 hours to write this down while the whole trouble-panic-solve happened in less than an hour……giving the fact I did some thinking and practiced blogging, I’d accept it as a not-non-sense learning progress.

5 how to jump inside a page using anchors. For more information, check post “Jump inside a page“.

Copyright © 2013 · All Rights Reserved · Timension

Powered by:
WordPress
WPlatformer
The Horizontal Way