Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Using Homebrew, I install MariaDB. It installs fine, but where is the ibdata1 file stored?
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/.
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