Actual storage path of my MARIADB

Hi,

I would like to know the actual storage path of my MARIADB (MySQL database), such as the real path where it is stored (e.g., /var/lib/mysql/). I’ve been searching for a while but couldn’t find it.

Thank you.

Hi,

Exactly in that dir /var/lib/mysql/.

You can check it with this command.

mariadb -u root -N -s -e "SELECT @@datadir;"

or this one:

grep -r '^datadir' /etc/mysql/