Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
How to restore mysql database from the physical files?

I received a bunch of these types of files and haven't a clue as how to restore the database on my Mac. I've found instructions on how to do this on Windows, that you simply need to put these into a specific directory and the database should be restored, but I don't know which directory, or even where it would be located in OS X.

Someone mentioned that I take a look at the my.cnf file, but it's empty. I also noticed that I had 2 mysql folders in usr/local/. I've uploaded a screen shot of the directory, as well as the opened cnf file at Screen Shot 1

Also, I opened up Sequel Pro (a MySQL client in case you're not familiar with the application) and it successfully connects to the local MySQL database. Screen shot at Screen Shot 2

Any help would be greatly appreciated!

share|improve this question

marked as duplicate by mailq, SmallClanger, sysadmin1138 Oct 21 '11 at 17:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 1 down vote accepted

The default database directory should be /usr/local/mysql/var or /usr/local/mysql/data according to the docs (where /usr/local/mysql is just a symlink to the installed version). It would contain the "mysql" and "test" subdirectories for these two databases and the "ibdata1" storage file for InnoDB tables. You should just

  • stop mysql
  • create another subdirectory and name it like the database you need to restore
  • copy your FRM, MYD and MYI files there
  • restart mysql

to see the results. Note that this would only restore MyISAM tables, InnoDB tables may have had a different storage directory or have been stored within ibdata1 of the original server.

share|improve this answer

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