by Usman Asar.
Adz,
possibility is, by the time you have accessed the site, your database server must be down, as some hosting companies does keep databases on separate servers, if still you are having same issue, then go to config.php file within your moodle folder and see if username, path and password for your configured database are correct.