You have to make sure you the connection details to the database are correct. The error says that it is not. Either the database is not running or the database connection details are not right.
Not sure if this is a local installation or an installation on a hosting provider, but if it is with a hosting provider, you need to make sure you get the correct connection string information from them.