alex3 Posted August 25, 2009 Share Posted August 25, 2009 I've a had a system problem and can only access the hard drive, not the OS (I can't boot in to it). I can access what I think is my old database. It's OS X I can't access, but I can see the drive contents in Ubuntu. Using MAMP, I've found the DB in /Applications/MAMP/db/mysql/database_name. The permissions on this folder are such that I can't see it's contents in nautilus but using ls in the terminal I can see a db.opt file, and three files for each table in the database, in this form: table_name.frm, table_name.MYD, table_name.MYI. How can I recover the data in these files and put them in a new database? Ideally, I'm looking to 'convert' these files in SQL commands I can just put into phpMyAdmin and recreate the tables. Quote Link to comment https://forums.phpfreaks.com/topic/171853-solved-recovering-a-db-from-files/ Share on other sites More sharing options...
Cezar708 Posted August 25, 2009 Share Posted August 25, 2009 You can create a new DB on existing OS (with the same name as "the broken one"). Next find the files of your new-created db and just copy all files from broken OS into new location. Finally you can run mysql dump. Regards Cezar708 Quote Link to comment https://forums.phpfreaks.com/topic/171853-solved-recovering-a-db-from-files/#findComment-906192 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.