Is it recommended to have the MySQL database location as the default one which is /varlib/mysql ? Are there any risks in having the databases in the specified location?
1 Answer
That's a standard suggested location in the installation layouts to-start-with and usually people tend to follow the defaults.
Just to answer it short - keeping databases under /var/lib/mysql as such is not a "risk" as such!
There are considerations though. You can always change your directory to a different partition for better manageability and to take IO advantages. I've even seen people softlink /var/lib/mysql to a different partition to keep things simple-to-view at configuration level.