I have two separate VMs for sharepoint and SQL server. Unfortunately Sharepoint crashed and I couldn't repair it and just could restore a full OS backup (by Symantec System Recovery) for about one month ago. Now I got error: can't connect to configuration database. My SQL server is OK and services are up and connection between these two servers are also OK. What could be the cause? If I didn't make any change in Sharepoint config, and just added data which I thought it just goes into SQL database, so what's up? I always thought the sharepoint server doesn't change in time by data import, and just the DB is important. I say again, I didn't change anything in Sharepoint administration and didn't logged in the server for a month.
"Cannot Connect to configuration Database" is pretty broad. You may need to look up how to reconnect content databases. Also, check and make sure your service accounts have permissions to access the database...
That is a catch all error. I sometimes got this error when an update was applied. Nearly every time I received this error running the SharePoint Configuration Wizard. just go to any command line running as an admin and run this command: