• Hi.

    I know there’s been quite a lot of posts about this one. I’ve tried all the recommendations that were written on those posts but to no avail.

    I do not know much about codes so please bear with me if I don’t get your answer the first time.

    This is what happened:

    1) I made changes under Settings/General Settings.
    I deleted the Blog Title, Tagline and Blog Address URL then I clicked Save Changes. I tried to open the it thru a new tab window but nothing happened. So I placed back the initial values written in Blog Title, Tagline and Blog Address URL and clicked Save Changes again.

    2) Then I reloaded the page and I get the response “Error establishing a database connection.”

    3) I tried to login to https://www.adnep.org/wp-login.php but I also get the message “Error establishing a database connection.”

    4) I tried to go to https://www.adnep.org/wp-admin/page.php and then I get this message “One or more database tables are unavailable. The database may need to be repaired” which I did wherein I added define(‘WP_ALLOW_REPAIR’, true); to the wp-config.php file.

    After I reloaded it, this message appeared:

    One or more database tables is unavailable. To allow WordPress to attempt to repair these tables, press the “Repair Database” button. Repairing can take awhile, so please be patient.

    Repair Database
    WordPress can also attempt to optimize the database. This improves performance in some situations. Repairing and optimizing the database can take a long time and the database will be locked while optimizing.

    Repair and Optimize Database

    I clicked on Repair and Optimize Database the following appeared:
    The wp_users table is okay.
    The wp_users table is already optimized.

    The wp_usermeta table is okay.
    The wp_usermeta table is already optimized.

    The wp_posts table is okay.
    The wp_posts table is already optimized.

    The wp_comments table is okay.
    The wp_comments table is already optimized.

    The wp_links table is okay.
    The wp_links table is already optimized.

    The wp_options table is okay.
    The wp_options table is already optimized.

    The wp_postmeta table is okay.
    The wp_postmeta table is already optimized.

    The wp_terms table is okay.
    The wp_terms table is already optimized.

    The wp_term_taxonomy table is okay.
    The wp_term_taxonomy table is already optimized.

    The wp_term_relationships table is okay.
    The wp_term_relationships table is already optimized.

    The wp_commentmeta table is okay.
    The wp_commentmeta table is already optimized.

    Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.
    define(‘WP_ALLOW_REPAIR’, true);

    5) I took off define(‘WP_ALLOW_REPAIR’, true); from the wp-config.php file then reload and Error establishing a database connection would still appear.

    6) I’ve got in touch with my host and they said that they have tested the database connectivity without error. I was told by my host to disable any plugins to see if that is the cause of the error.

    7) I’ve already checked the connection strings and so far, it’s the same values as written in my wp-config.php file.

    Questions:

    1) How do I disable any plugins?

    2) Is there a System Restore with WordPress just like in Windows so I can restore it at an earlier time?

    3) Is there hope?

    Thank you for your time.

Viewing 4 replies - 16 through 19 (of 19 total)
  • i had exactly thesame problem as thread’s author (‘error establishing database connection’ at site and info about missing table in /wp-admin, while mysql server was running), i solved this problem but reason was diffrent than this which was described by sidarcy. i will describe how i did it ??

    – i went to phpmyadmin, everything looked good
    – i went to wp_options table and phpmyadmin showed me that this table is broken and should be repaired
    – so i went again to list of all table i checked wp_options table and from select menu at bootm i choosed ‘repair’

    now everything works ??

    tip: if your wp_options table is fine, check other tables in thesame way as described above

    Hi, I have exactly the same problem – when I tried to remove the blog title address – I refreshed twice and got the database connection error. Is it a problem on the hosting side? Or is it a bug on wordpress?

    Thank you everyone discuess. I have exactly the same problem.
    I find two line option_value of wp_options table is empty.
    I change it to my site url.
    “2 0 siteurl ” —> “2 0 site url https://www.a1588.info”
    now everything works ??

    One or more database tables are unavailable. The database may need to be repaired.

    I got this message when I tried to upload WordPress to my new site. I have worked with WordPress quite often but I have never seen this before, what does it mean, and better yet how do I fix it. I tried to repair the database but it wont go through with it completely. Anything would help!!

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.