I just had this issue that took me a little bit of time to figure out.
In the $hostname_localhost of the localhost.php page if you're developing on your local machine, "localhost"; should work. If you are on the actual server and getting this error the path needs to change to the database server address, see my $hostname_localhost information below for reference:
$hostname_localhost = "daddyshomecms.db.#######.hostedresource.com"; $database_localhost = "daddyshomecms";
I'm using this on Godaddy hosting and is working well. PHPmyAdmin if available will give you the database server name.
Hope this helps