Fix Error Establishing A Database Connection In WordPress

In this post I will discuss about Error establishing a database connection error in WordPress blog and steps on how to fix it. Although, this error can occur due to various reasons I will discuss two troubleshooting steps which have helped me to fix this error.

Error establishing a database connection in WordPress blog
Step-1: Fix the error by repairing database from cPanel: You can read one of my posts on how to repair database from cPanel. For me, sometimes this has fixed the Error establishing a database connection error. If this didn’t work for you continue to Step-2.

Step-2: Fix the error by restarting MySQL service: If you have access to Parallels Virtuozzo Power Panel, you can fix Error establishing a database connection error in WordPress blog by restarting the MySQL service. Usually, with a VPS you will get a Virtuozzo Power Panel.

Login to your Virtuozzo Power panel. Click on “System Services” under “Services”.

Click on System Services under Services in Virtuozzo Power panel

Check if MySQL service is stopped or running. For Example, here MySQL service is stopped. Now, click on MySQL service.

Click on MySQL service in Virtuozzo Power panel

Then, on the next page click on “Start Service” button.

Click on Start service in Virtuozzo Power panel

This will start the MySQL service again and you will see that its running.

MySQL service is running in Virtuozzo Power panel

Even if the MySQL service was running in the first place, you can go ahead and click on the button “Restart service” to restart the MySQL service.

Click on Restart service in Virtuozzo Power panel
This will fix the Error establishing a database connection error in your WordPress blog.

Step-3: If the error still persists, you can contact your web hosting support to fix the error.

Download thousands of Themes, Plugins & Graphics to create your Website. Use promo code ThatsJournal and get an additional 10% off for All MonsterONE Plans.
Disclosure: Thats Journal is supported by our readers. This page may contain affiliate links. That means, if you click on these links to make a purchase, we may earn a small commission (at no extra cost to you). These funds help us to keep this blog up and running.