"Error Establishing a Database Connection" in WordPress, Causes and Solution.

In this article we shall look how to resolve the "Error Establishing a Database Connection".

There are a few different ways in troubleshooting.


What does the "Error Establishing a Database Connection" error mean?

This error shows inability of Wordpress script to locate or to connect the database.

What causes this kind of error?

There are a few different causes. Let’s look each of them and recommend possible solutions.

1) Due to incorrect connection parameters
These parameters are located in the wp-config.php file. You can find it in the root folder of your WordPress installation. The credentials are database name, database user, and password. Check if they match the information, located in your cPanel or in case you remember database user and password, just reset them

If you forget them, it’s necessary to delete and recreate the database user. Use the password from the wp-config.php file. Now, refresh and check your site.

2) Due to corrupted database tables
Another reason for 343: "Error Establishing a Database Connection" could be corrupted database tables.  You should check and repair them from the cPanel.

3) Due to many concurrent database connections
Too many connections can cause the 343 error, too. The default limit for most of servers is 30 connections at once. If this is your reason for the errror, then stop it by enabling caching plugins on the website. Due to this setting the overall number of database interactions will be limited.

Finally, we should note, that 343: "Error Establishing a Database Connection” could be caused by other reasons such as log out of WordPress admin dashboard when it’s out of use, disabling the WordPress auto save or limits of WordPress revisions.
  • wordpress, errors, database, solution, wordpresserrors, wordpresshosting, mysql, phpmyadmin
  • 6 Users Found This Useful
Was this answer helpful?

Related Articles

How to use Jetpack / WP Super Cache with WordPress

ZillionKingHost servers block remote connection to xmlrpc.php or, wp-cron.php for security...

How To Hide Your WordPress Login Page from Hackers with Code

There are 40 million brute force attacks on websites every day, so it’s highly likely your site...

Migrating an Existing WordPress.com Site

This article can assist if the WordPress blog is hosted on WordPress.com. Just follow these steps...

How to Login to a WordPress Site

How to login to your WordPress site Determining your login URL The default URL to login to...

How to update your WordPress installation

Update Using WordPress Tools These steps will explain how to manually update WordPress using...