Restore MySQL from raw data

jaredjared College Station, TX Icrontian
edited August 2009 in Internet & Media
Alright, I have a question for any of you server admins - particularly who deal with IIS (i know, I know)

A buddy of mine and I co-manage a Windows server (Actually, he does most of it, I just make websites that go on it :D).

The HD decided to take a dive on us the other day, forcing us to swap out drives, get the install back up to par, and load the backups.

Luckily, we had back ups of all the clients' files. Well, almost.

Some how none of the MySQL data had been dumped during the scheduled backups.

So, after repeated *facepalm*'s we realize we don't have a
good backup of the databases but we do have the complete mySQL 5 directory including the data files. However, I can't seem to find any information about restoring the databases using the raw files.

Any pointers?

cheers :jared:

Comments

  • jaredjared College Station, TX Icrontian
    edited August 2009
    Well a buddy of mine said it shouldn't be a problem.

    Something along the lines of "fire up mysql, create a DB" and "copy the .myi and .myd files over there".

    I'll see what kinda trouble I can get into.
  • LincLinc Owner Detroit Icrontian
    edited August 2009
    I like his style. That's what I'd do - create a blank one and overwrite. Good luck.
  • ardichokeardichoke Icrontian
    edited August 2009
    Should work. You'll probably want to run a repair on the databases once you're done though just to be safe.
  • ShortyShorty Manchester, UK Icrontian
    edited August 2009
    Do that on a demo server with an installation as close as possible to the previous one. Then do a mysqldump into files after doing a table check to correct any tables errors.

    Then load it into the new DB fresh. This allows you to correct errors, move to the latest stable version and control data integrity :)
Sign In or Register to comment.