Normally MySQL data will store in /var/lib/mysql, but still you want to check the the location of your database then you can follow below steps:
You can use below command to find the location of data directory:
You can get the directory for MySQL with above command, but you will get nothing in return then you can use default directory /var/lib/mysql.
You can use below command to find the location of data directory:
Code:
mysql -e "show variables like 'datadir'"
Code:
grep datadir /etc/my.cnf