If you are freshly installing the latest vm-pro 6.17 and need to change from MySQL8.0 default to MariaDB. You should first, run updates & upgrades, remove MySQL8.0, reboot your server, manually install MariaDB, then finally run the in Virtualmin post installation wizard.
This will save you a few hours of troubleshooting.
Bed time…
If you try to switch MySQL8.0 after the Post-Installation wizard, you somehow get faced with a 4 to 5 year old bug.
I believe there’s an easier way. If memory serves me correctly (questionable as of late - lol) you can simply install MariaDB and it’ll detect MySQL and effectively remove and replace it.
Why risk a possible incompatibility problem with a completely new install of MySQL with zero databases? Decided to err on the side of caution and just completely wipe out MySQL before installing MariaDB.
Here’s a nifty one-liner to wipe-out MySQL should anyone be interested: