
Solving some web hosting problems aren’t that tough!
Most of the cases, lack of communication between the customer and the website hosting company can cause a bigger problem while solving the problem.
There are typically few reasons that lead to database connection error if there’s a noted database connection error, but everything looks fine in the wp-config.
One thing that can happen is, the provider may have taken it upon themselves to temporarily disable your database due to excessive use or some other contractual infringement.
If it still does not work, you need to ask the hosting provider to check into it.
You should be prepared before the big hit on your website (especially before summer/winter/eid sale if you have any e-commerce site).