Error establishing database connection resolved quickly
Anyone who has run a blog or website for some time must have encountered those little nerve-racking moments where you suddenly cannot connect to your website or the connection gets timed out. As usual, we are going to give you simple possible solutions for these two issues. As usual, we wont use jargon or processes that sound so technical to you the way other websites do.
Connection timed out solution
We use WordPress just like most people do for websites and blogs. Sometimes, you may want to access your website and each time, the connection fails. You see a message like ‘Connection timed out server could not be reached’.
Your face turns blue because you have no idea what is happening, and try to call your service provider in vain. You know very well you will not be able to sign into your website with such a problem. Most of the time, the causes for this problem are:
- Cookies and cache
- Server issues
1. Clear all your cookies and history
Once you clear your cookies and history, try accessing your website again. This should ideally solve the problem. If it persists,
2. Restart your server
If you have access to a server, just restart it. If you are using a MiFi, restart the MiFi modem by pressing a small button just next to the battery. Use a pointed thing like a pen or a pin to press the button. (Most MiFi modems have the word RESET next to the button to help you identify it.)
Remember, switching the MiFi off and on again is not restarting the server side of the modem. You should restart it while it is still on.
Once you have cleared all your cookies and history and restarted your server or MiFi, you should be able to access your website once again. Cheers!
Error establishing database connection solution step by step
When you encounter this for the first time, your face goes pale. The difference between Error establishing database connection and Connection timed out is that in the first instance, everyone is unable to access your website on the internet. In the second instance, only you cannot access the website. Our solution has been experimented to solve websites that run on WordPress especially, but should also work with other CMS.
You must be able to access your cPanel to solve this issue.
- Log into your cPanel.
- Scroll down your cPanel page until you get to SOFTWARE section.
- Click on WordPress Manager by Softalicious.
- You will see all your WordPress installations, including directories, subdirectories and subdomains. The purpose of going here is to ascertain the identity of your databases.
- On the right side of each website, directory and subdirectory, you will see whether all your WordPress installations are up to date or not. Just next to the Up to date button, there is a dropdown arrow. Click on the dropdown arrow to reveal the details of each installation/website/directory.
- Don’t worry about the rest of the details. What you should be interested in are the database details. Below all the other details you will see +Database Details and View Database. Click the addition (+) sign on the +Database Details.
- You will see the database name which should be something like Database Name verse_wp188. Write that database name on a piece of paper.
- Repeat the process for all the website directories and subdirectories in your WordPress installations. Once you have all the Database names on a piece of paper, click on cP icon in the top right corner to go back to cPanel.
- Scroll down the cPanel until you reach DATABASES. Click on MySQL DATABASES.
- You will see all the Databases for your installations. Use the Database names you wrote down earlier on to compare with the CURRENT DATABASES that exist. Delete any database that IS NOT on your piece of paper. But do not delete the very last one wp_star. Be careful so that you do not delete a database of your active websites. The DELETION CANNOT BE UNDONE. Take your time.
- Under MODIFY DATABASES, use the dropdown arrow to select the main Database and Repair It. Repair ALL the databases, one at a time.
- Logout and close your cPanel. Go to your website and type in the address. HOORAAAY!