config file is very sensitive .... ticks, ending ";", no closing php tag ... and it's true, there might have been something errant that you could not see ... none displayable character ... a space is one of those so are CR CR/LF's
Without actually seeing the backups compared to what was present when you discovered the issue, I'd be capable of a "Vulcan Mind Meld"! Uhhhh .... have never meet Spock to have never been taught - and even if I were, ... well, you get the gist.
So provider lost your backup of your DB. Hmmmmm ... that would make one un-easy ... large withdrawal from the 'bank of trust' ... so yeah, think I'd backup on a regular basis.
Since Moodle needs a DB that that be the explanation. Don't think Moodle is an app that actually creates the DB for you upon installation.
Well, it's good that you didn't loose a years with of work ... classes.
'spirit of sharing', Ken