This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-17. For the latest, interactive version please visit https://mariadb.com/kb/.

Default Data Directory for MariaDB?

Where does MariaDB save the data? I am using Ubuntu 11.10 and would be interested to know what is the exact path to the datafiles. I apologise if this is one of these questions which has been asked often before but I could not find an answer in the Knowledge Base.

Answer

The data directory location is controlled by the datadir variable. Look at your /etc/mysql/my.cnf file to see where your installation of MariaDB is configured to store data. The default is /var/lib/mysql but it is often changed, like for example if you are using a RAID array.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.