Support » Fixing WordPress » A Previously Fine Website Now Says: "Error establishing a database connection"

  • Resolved PaulCutcliffe


    I run a Debian server and use the Plesk Panel to create and manage the server, including various WordPress-based websites. However, my background is with Windows servers, so sometimes need a little help when using Linux.

    Literally once every few months, the server crashes and all the websites (& other services) go down. At this point, I don’t seem able to log in, and there is some message repeatedly shown on the console, although most helpfully, I can’t remember what it says.

    Anyway, this happened last night, & I restarted the server, as that is the only thing I can do since I can’t seem to log in. I tested a couple of the sites, & all seemed well.

    However, this morning, once of my clients has called to point out that his website is down, needless to say, not one of those I checked.

    When trying to access the website, you get this message:

    Error establishing a database connection

    And if you try to access the database through the Plesk panel & WebAdmin, you get a Permission Denied message.

    So I don’t know where to start, or what to do.

    I do have a few backup databases, one of which I made the this morning (since this problem, so it may not be okay), but I can’t even see how I can switch from one database to another.

    Help! What should I do?



Viewing 6 replies - 1 through 6 (of 6 total)
  • All fixed.

    I went into PHPMyAdmin (not WebAdmin as I called it before), not into the specific database, which didn’t work, but as the administrator, then found that the wp_options table said it was crashed, and the previous (automatic) repair had failed. So somewhat nervously I selected the table and selected Repair, & hey presto, it’s all working again.

    I didn’t expect the Repair operation to succeed, given that it had failed previously, but luckily for me, it did. 🙂

    Your solution worked for me and fixed my problem quickly. Thank you for posting!

    @beyondmockups – Excellent! That makes it worth the couple of minutes it took me to update the post with how I fixed it. 🙂


    How and where did you see that it was crashed?


    If you are using Godaddy, you should know this.

    Web Hosting, Hosting January 13, 2013 at 3:08 PM
    We’re aware of an issue within our Web Hosting services impacting some customers. While we’re fixing it, you might experience longer than normal phone support hold times. Thanks for your patience.

    4GH Hosting January 9, 2013 at 5:29 PM
    We’re aware of an issue within our 4GH File Manager causing statistics to not display for some customers. We appreciate your patience while we’re fixing it.

    I couldn’t find any crashed databases in PHPMyAdmin.

    Hope this helps.

    Yeah, my site is back up now. Weird…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘A Previously Fine Website Now Says: "Error establishing a database connection"’ is closed to new replies.