Using Homebrew, I install MariaDB. It installs fine, but where is the ibdata1 file stored?

3 Answers 3


On M1 Mac, Homebrew installs files into the /opt/homebrew/ folder. So with MySQL/MariaDB installed by Homebrew, default data directory is /opt/homebrew/var/mysql/.

It contains all databases and ibdata1 and other files previously placed in /usr/local/var/mysql/.

  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jun 26, 2022 at 21:07

From your MySQL Command Prompt, after root login,

SELECT @@datadir; should reveal the folder name


/usr/local/var/mysql is the default data directory for MariaDB.

It includes the ibdata1 file, log files, etc

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .