Error establishing a database connection
-
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.
- The topic ‘Error establishing a database connection’ is closed to new replies.