If You have error with connecting to database - it is 100% source of the problem.
Please check again, step by step data base name, user and password. Also check if host should be localhost, or perhaps something else (some hosting companies host their database on different hosts). Also in few cases, You need to add
ort_number at the end of database host. It all should be described in your hosting company documentation.
If You still have problem connecting to database, please contact your hosting provider - they should be able to help You.