The official line is that you shouldn’t call mysql with passwords on the command line and should use the credentials file.
Obviously Virtualmin does things in a certain way, the work around is to say ignore errors and continue and it works fine, it’ll say failed but everything including databases is there.