Page 1 of 1

restore database in linux after windows hard drive crash?

PostPosted: 12. June 2011 14:01
by squashmats
Hi guys,

My hard drive on my windows laptop crashed a few days ago so i made a Ubuntu boot USB stick and am able to access my hard drive (or whatever's left of it) through Linux.

I did all that because I made a mySQL database in windows and wanted to recover that somehow. The problem is that I don't know how and can't seem to find it anywhere.

I tried to copy the ib_logfile0, ib_logfile1 and ibdata1 from the broken hard drive to the one on my new windows laptop but that doesn't seem to work. Has anyone got an idea?

if this is the wrong subforum, i apologize but i am new here :D

Re: restore database in linux after windows hard drive crash

PostPosted: 12. June 2011 16:12
by WilliL
you'll find mysql databases on an windows installed xampp system:
XAMPP installpath: c:\\xampp
c:\\xampp\mysql\data\NAMEOFDATABASE

copy complete folder (if exists) to a new installed xampp (same version!!) and it should work.

Re: restore database in linux after windows hard drive crash

PostPosted: 12. June 2011 18:53
by squashmats
thanks a lot, you saved me an awful lot of hours of retyping everything!

Re: restore database in linux after windows hard drive crash

PostPosted: 13. June 2011 17:29
by JonB
an even better idea would be to learn how to make MySQL backups -

you can use phpMyAdmin or mysqldump.exe

http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

http://www.thegeekstuff.com/2008/09/bac ... mysqldump/

http://fragments.turtlemeat.com/mysql-d ... yadmin.php

Good Luck
:D :D