Howdy,
Yes, Virtualmin just uses the software versions that come with the distro you’re using. We also don’t recommend using software from third parties, as that can introduce a lot of complications.
PHP is a bit simpler, as you can install a second PHP version alongside your existing PHP version.
But that’s not so simple with MySQL.
As diabolico mentioned, our recommendation in your case is to use a Linux distribution that provides the software you are interested in.
-Eric