As I would like to move those files from one server to another server, while the database is offline.
It should be stored in: /usr/local/mysql/data
When you use mysql installed via Homebrew, you should find your database folders and files in
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).
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.
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.
If you've installed MySQL by running MAMP on the Mac, then the files are stored at
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: https://stackoverflow.com/questions/7341897/where-does-sequel-pro-mamp-store-local-databases