Restore a Moodle database

Restore a Moodle database

by Mark Perillo -
Number of replies: 1

Hi, I have recently dropped a a databse from my MySQL server by accident. I have the database files, but when I put them back into MySQL moodle thinks it needs to be re-setup again. Is there any hope in getting thbis Moodle back?? It is version 1.1.

Thanks..

Mak

Average of ratings: -
In reply to Mark Perillo

Re: Restore a Moodle database

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What do you mean you have the database files?

*If* you mean that you have all the files from the mysql var directory (.frm) and suchlike. You should create a new database in mysql (create database moodle or whatever) then copy those files into the new directory. This *will* work I have done it many times before. You will need to do the 'grant' line again to set the username and permission and check everything lines up properly with config.php.

Does this help? I can't think what else may be wrong.