Cannot connect to the configuration database

‚ÄčThis error message usually indicates a network connectivity problem between the SharePoint server and SQL Server machines. Check for network problems and firewall settings. These are the things most likely to have changed that our outside your control.

Check that your application pool account has permissions to the SQL Server database. Changes to the SQL Server configuration can also be a cause, and might have changed without your knowledge.

It can also be caused by the SQL Server database not running or offline. Check this by going to Services on Server and ensuring that the SQL services are running (MSSQL-----).