Check whether this data is correct. You can obtain the login information from your hosting provider (you can often see the login data online in your computer profile of your provider). Make sure that the syntax is correct at this point as well. The hostname depends on your provider. WordPress offers a list of DB_HOST values in its codex. Once you have found the place where the error occurred, simply correct the corresponding values and upload the correct version to your server.
Incidentally, the same solution also works if the problem occurs immediately after a new installation. You have probably entered the wrong user data in the installation window. Instead of starting all over again, you can edit the wp-config.php directly.
If this doesn’t solve the problem either, it is possible that there’s nothing wrong with your database or the login data. Instead, the server that hosts your database has probably encountered a problem and has triggered the WordPress’ "Error establishing a database connection" error. There can be two reasons for this: either the entire server is currently down or at least temporary overloaded by too much traffic. In the latter case, the problem solves itself within a few minutes. If overloads like these occur frequently, you should consider finding a better solution with your hosting provider.