• I recently took a beta site live on a new url for a client (https://oldsite.com/beta to https://newsite.com). I followed the directions for exporting and importing the site files as well as the database. Everything seemed fine, but recently the website will show ‘Error establishing database.’ Now it doesn’t show every time the website is accessed, but it will show every once in a while. I tried repairing and optimizing the database, and received this message:

    wp_users: 1 client is using or hasn’t closed the table properly
    wp_usermeta: 2 clients are using or haven’t closed the table properly
    wp_posts: 3 clients are using or haven’t closed the table properly
    wp_options: 25 clients are using or haven’t closed the table properly
    wp_postmeta: 5 clients are using or haven’t closed the table properly
    wp_terms: 1 client is using or hasn’t closed the table properly
    wp_term_taxonomy: 1 client is using or hasn’t closed the table properly
    wp_term_relationships: 1 client is using or hasn’t closed the table properly

    Does anyone have any advice on this? I am not a developer, but somewhat know my way around code.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Is there more than one site in any way connected to that database even if each has a different table_prefix, and if so, does each have a different SQL user? I do not know what is causing your problem, but maybe something here can help: https://www.google.com/search?q=clients+are+using+or+haven%27t+closed+the+table+properly

    Moderator t-p

    (@t-p)

    recently the website will show ‘Error establishing database.’ Now it doesn’t show every time the website is accessed, but it will show every once in a while.

    – Are you saying the ‘Error establishing database.’ is intermittent?
    – Yes?
    – If the error is intermittent then it’s your server. What’s happening is that the web server and/or the database server are gettign overloaded and the connection is droping out or is refused for a short time. That gives you the database error as the website can’t connect to the database. To fix this, you’ll need to talk to your hosting company as they are the only ones that can do anything about hardware issues like this.

    Thread Starter anvilhasquestions

    (@anvilhasquestions)

    I exported the database table from the old site to the new one, but created a new database, user, and password. And yes, the error is intermittent. The website will work fine sometimes, and show the error others.

    Moderator t-p

    (@t-p)

    And yes, the error is intermittent.

    – Then it’s your server. What’s happening is that the web server and/or the database server are gettign overloaded and the connection is droping out or is refused for a short time. That gives you the database error as the website can’t connect to the database. To fix this, you’ll need to talk to your hosting company as they are the only ones that can do anything about hardware issues like this.

    Thread Starter anvilhasquestions

    (@anvilhasquestions)

    Ok, thank you very much.

    Moderator t-p

    (@t-p)

    you are welcome ??

    Thread Starter anvilhasquestions

    (@anvilhasquestions)

    I tried repairing and optimizing the database, and received this message:

    wp_users: 1 client is using or hasn’t closed the table properly
    wp_usermeta: 2 clients are using or haven’t closed the table properly
    wp_posts: 3 clients are using or haven’t closed the table properly
    wp_options: 25 clients are using or haven’t closed the table properly
    wp_postmeta: 5 clients are using or haven’t closed the table properly
    wp_terms: 1 client is using or hasn’t closed the table properly
    wp_term_taxonomy: 1 client is using or hasn’t closed the table properly
    wp_term_relationships: 1 client is using or hasn’t closed the table properly

    Would these errors cause the database connection to time out? We had contacted the host server previously, and they said there is no issue. So I want to double check everything before contacting them again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘'Error establishing database' occassionaly’ is closed to new replies.