Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Time Machine backup drive from a MacBook Pro machine I don’t have anymore (technically, I reformatted a while back). It contained a MySQL database installed, managed, and run by my XAMPP for OS X installation (an much older version than the latest).

I’m looking for any and all help recovering that database. Where should I look for what files? How should I recover the data from them?

(Please let me know if I should post this to Stack Overflow instead.)

share|improve this question
    
You're looking for the Data folder, in which the database file(s) will be stored. If Time Machine ran while the database was in use, there is a chance of corruption due to unwritten pages. You can try pointing your new MySQL instance at the file(s) but there's no guarantee it'll work. –  user3463 Feb 13 '11 at 2:42
    
@Randolph The only Data folders that appear to be in /Applications/xampp/ are within "pear" and "perl5" and don’t look like they contain database files (unsurprisingly). Should I be looking elsewhere? –  Alan H. Feb 13 '11 at 20:43
1  
There should be a data folder for the MySQL installation. If you can't find it, look for a file or folder with the name of the database. –  user3463 Feb 13 '11 at 21:33

1 Answer 1

up vote 1 down vote accepted

Success!

Using Back-In-Time, I have copied out an old version of Applications/xampp from the Time Machine backup.

Of note seems to be the folder xamppfiles/var/mysql, which appears to contain folders with names of the databases I had running under XAMPP.

I simply copied the folders corresponding to the databases I wanted to restore to my new machine’s Applications/XAMPP/xamppfiles/var/mysql, restarted MySQL, and was good to go!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.