Post-install Wizard should be much more graceful about database root password already being set

This has come up a bunch in recent months/years, and I've even seen it myself on a couple of test installs on virtual machines.

A lot of times, there will be a root password set for MySQL, but the user doesn't know it, and so Virtualmin makes them do a clumsy bouncing around between Webmin (and maybe command line; I don't think even the Webmin module will correctly handle resetting a password if you don't know the original one).

There should be a "go nuclear" sort of option, to allow the user to tell Virtualmin to force a reset of the root password, if they don't know the existing one. This would, of course, need to go through the rigamarole of stopping MySQL, starting it with --skip-grant-tables and --skip-networking options, resetting the password, and then restarting it normally. But, it'd make a lot of customer complaints/confusions go away.

We also probably need a better error message. But, I guess if we just added a checkbox to say "force reset of root password", that'd make it less of a big deal that the error is scary for some.


That's not a bad idea, although it would need to have a big warning so that experienced admins don't blow away their root password and break other apps already talking to MySQL.

Joe's picture
Submitted by Joe on Sat, 02/18/2017 - 17:30 Pro Licensee

Yes, I think it should be clear about what's happening, but I got a report that it always happens, even on a fresh install with no one ever having set the password, on Debian. So, it seems like some distros now set a password regardless of what the user knows about. We just need to handle it better. Resetting it from the command line is intimidating for non-technical users.

Any idea what Debian sets the default password to? An even better user experience would be to have Webmin use that by default, if possible.