By default all database and data are stored in /var/lib/mysql
But whenever, you’re planning to setup a virtual hosted server, it is wise to set up and configure this db to be set up in some different bigger disk space. Like I use to place this data path to /home/mysql
How to change this using webmin
- From your webmin Servers > MySQL Database Server > MySQL Server Configuration section look for-
- Database files directory = /var/lib/mysql
- Now change this to-
Database files directory = /home/mysql - A small reminder- don’t forget to create “mysql” directory in /home location!
- It’s done!
You have changed the data storage path!
Precaution:
It is recommended to modify or update this mysql data path on a fresh installation- without any cpanel or virtualmin server is hosted.
And also don’t you forget to restart the MySQL service after this changes are made! Happy data organizing!!! 😛