Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As I would like to move those files from one server to another server, while the database is offline.

share|improve this question
up vote 11 down vote accepted

It should be stored in: /usr/local/mysql/data

share|improve this answer

When you use mysql installed via Homebrew, you should find your database folders and files in /usr/local/var/mysql

share|improve this answer

OS X Server (at least v10.6) keeps the database in /var/mysql by default. You can change this in Server Admin -> MySQL service -> Settings -> Database location (note that editing this field doesn't actually move the data, just changes where it's loaded from).

share|improve this answer

I don't have access to my Mac right now, so can't say for certain. Why not simply search (from Terminal, not Spotlight) the file system for "mysql", as there will always be a table named mysql.

share|improve this answer

Look for the my.cnf file - should be in the /etc/ directory and then look for a line like:


The datadir is where mysql stores all the database files.


share|improve this answer

If you've installed MySQL by running MAMP on the Mac, then the files are stored at /Applications/MAMP/db/mysql

For MAMP Pro, the files should be in /Library/Application Support/appsolute/MAMP PRO/db/mysql

Stack Overflow answer that addresses MAMP / Sequel Pro installations here:

share|improve this answer

Your Answer


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.