Virtualmin does not respect non-standard mysql database locations

When restoring from a backup with a different datadir configured in my.cnf:

datadir = /mnt/RAID

Virtualmin restore does not change permissions on the correct datadir, it tries (and fails, for me) to apply those permissions to /var/lib/mysql/. I temporarily solved this problem with a symbolic link between /var/lib/mysql and /mnt/RAID on this system. If this had been an emergency situation, the time spent troubleshooting this issue could have been catastrophic.



That's odd, because Virtualmin actually should already read that datadir line to work out the MySQL data directory.

Can you post the /etc/webmin/mysql/config file from your system? And check that the my_cnf= line has the correct path to my.cnf on your system.