In this PDF I share the solution that I did to fix “Error establishing a database connection” on my WordPress sites Feel free to share/pass this PDF in any ways & any place that you want.
If your website is based on WordPress, there’s a big chance that you will get this error at least once in your life.
Please don’t get it wrong, I’m not cursing you but just telling the fact. :P This is the error notice that you see when you try to visit your website:
As stated above, the error happens because:
1.) the username & password in your wp-config.php file is incorrect Or 2.) your database server is down (not your hosting)
The best recommendation if your website is having this problem is to contact your hosting support.
But if you want to solve it yourself, it will only take 5-10 minutes even if you’re not too techie
First Step: Login to your cpanel
1.a) Then click File
1.b) Select the concerned
1.c) A new window will be opened.
You will be arrive at a page with list of files. Look up for wp-config.php file (1), select that file then click edit (2).
1.d) A new window will be opened, you are opening your site’s configuration file now. Do not edit anything as this file is the core of your website.
Look up for Database Name, “MySQL database username” and “MySQL database password”
First step is done, lets’ continue.
Second Step: Updating Database
2.a) Go back to cPanel home (index), after that visit MySQL Databases
2.b) You are now on the MySQL Database page. Click the username on the appropriate database (that you get from step 1.d above)
2.c) Give the user All Privileges (1), click Make Changes (2), after that go back (3)
2.d) Now you’re back to the MySQL Databases page as on step 2.b, scroll down the page until you see list of Current Users.
After that click the concerned user.
- File Size:914 KB
- License: Giveaway Rights
- Category:Ebooks
- Tags:2013 Ebooks Give Away Rights