To solve the database connection error, follow the below steps,
1. Go to cPanel and open File Manager.
2. In File Manager, open the public_html folder
3. Check and configure the below values in the wp-config.php file
- Database Name
- Database Username
- Database Password
- Table_prefix
4. After configuring the values click “Save Changes”.
