Introduction
Typically, MySQL will store data in the default directory of /var/lib/mysql. However, this can be changed. This article covers how to check what directory MySQL is using for its data.
Procedure
The data directory currently being used by MySQL can be found with the following command.
mysql -e "show variables like 'datadir'"
The data directory that MySQL will use upon being restarted can be found with the following command. If nothing is returned, MySQL will use the default of /var/lib/mysql.
grep datadir /etc/my.cnf
Comments
0 comments
Article is closed for comments.