by James Steerpike.
Thanks Ken. Problem was in the moodleuser, reference to superuser set me straight. I had created a root user earlier in the install and a moodleuser later, looks like only root could restore.
I had the database as moodle - but I had removed my password in the code snippet.
Not quite there yet - Moodle is up but refusing access. Job for tomorrow.....