I got this error while i was installing a Codeigniter application in my Cpanel. The strange thing is it is working very well in my localhost but not in my Cpanel. And I updated all the required fields with apt credentials..
Error
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 346