To answer your question about what would cause this error - it's all about the four variables in that config file (database name, database username, password, host). As you're probably aware, if any one of them isn't exactly correct, it won't connect.
In my experience, if there's a problem, it's usually because the user doesn't know to use the specified host address (instead of 'localhost') or he/she is using the wrong password. Keep in mind that the password for the database is unique - it's not the same as your hosting account password (unless you made them match).
If you're not able to get this sorted out and you're comfortable posting the domain name in this forum, I can take a look at your account to find exactly what's going on. I'd then get an email out to you using the address on your account rather than posting account-specific info here.
[ Signature moderated. ]