Get the MySQL path

command, linux, mysql, terminal

Solution

Try this query,

`SHOW VARIABLES LIKE 'datadir';`

Problem

I tried googling to get the MySql path, but it was unsuccessful. Is there a unix command, where I can find the MySQL database directory path?

Original source