This Tutorial will Guide you on how to fix your Wordpress Database Connection Issue. All you need to do is to Follow this tutorial Step by step to get your site fixed.
Step one.
Login to your Cpanel with your correct Cpanel details.
On your Cpanel dashboard go to the database tab. Click on Mysql Database as marked on your screen.
Step two
scroll down to the current users section and select the user assigned to the database.
Click on the change password as shown.
Step Three
Click on the Password Generator.
It pops a modal for you.
Copy the password generated for you and check the box as shown on the screen.
Next Click on use password.
After you have clicked the use password button the modal closes.
Now you can click on change password to change your Database user password.
Step four
Go back to your Cpanel dashboard and select the file tab as marked on the screen.
Now you have opened your filemanager.
Double Click on the public_html folder to open the folder.
Inside your public_html or the folder where you installed your wp site,
locate a file called wp-config.php.
Right Click on the wp-config.php file.
Click on Edit to Edit the wp-config.php
After you have done that the file opens in a new tab.
Scroll down and locate DB PASSWORD.
Now you can replace the old password with the new one you generated on step three, and click save to update your database connection.
Congratulation you have successfully fixed your site.