15

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

20

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

  • Just as a note, this is where it was stored when I installed MySQL using their actual GUI installer rather than via Homebrew. There are quite a lot of different ways of installing it! – Matt Fletcher Aug 10 '16 at 8:27
19

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

1

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).

0

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.

0

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

datadir=/var/lib/mysql

The datadir is where mysql stores all the database files.

Autobyte

0

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: https://stackoverflow.com/questions/7341897/where-does-sequel-pro-mamp-store-local-databases

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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