BTW, my suggestion here is not just to fix the bug with manually setting the password for root, but is also a request to do the resetting earlier (maybe during installation or immediately thereafter). Or, make it clear somehow that users should change this (like an alert).
I did same thing as you. I changed MySQL root password throw mysql shell and now I’m getting error when I’m trying to add/edit/update settings throw virtualmin panel I’m getting “Access denied for user ‘root’@‘localhost’ (using password: NO)” error.
What should I do to get rid of that error and also protect root account with password?
You need to set the password for the Webmin MySQL module. It has no idea that you’ve changed the password or what you’ve changed it to–all it knows is that it can’t connect anymore. Set this in the Module Configuration.
We do recommend changing the MySQL password, and include the steps for setting of it in the MySQL module, somewhere in the documentation…but I’m not seeing immediately where. I’ll add it to the installation guide. It’ll probably be added to the install script in the next few weeks.
You can also set the MySQL password from within Webmin, without having to hit the command line, in the User Permissions page.