These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Changing MySQL root password in CLI on the new forum.
I know I can change Webmin root password with:
/usr/libexec/webmin/changepass.pl /etc/webmin root
Now I wonder is there any webmin command to change MySQL root password in a command line? I wonder does clicking on Webmin > Servers >MySQL Database Server > Change Administration Password > ... > Change Now trigger any webmin CLI command?
I know there is recommended way of changing MySQL root password on http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
shell> mysql
mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
mysql> FLUSH PRIVILEGES;
but I am looking for even nicer and shorter way of updating MySQL root password in a CLI. Oneliner like /usr/libexec/webmin/changepass.pl /etc/webmin root
would be just great.
Howdy,
There isn't a simpler way on the command line using Virtualmin.
The way you found is the best way to reset the MySQL root password if you no longer have the original password.
Or, if you're just looking to change the MySQL root password, and you still have the original one, you can use the
mysqladmin
tool to do that.Something like this can do that:
mysqladmin -u root -p'oldpassword' password newpass
Hi,
I am looking for easy way of changing MySQL root for multiple copies of the same Cloudmin VPS'. Can't leave the old one for different VPS', at the same time constantly changing it with looking first at the old password is (ok and doable, but) tiresome. The way I found also takes too long, especially when doing it many many times.
So I am starting to think if there is no onliner way of changing the MySQL root password without old password, then maybe there is a file containing the password somewhere, that could be simply removed in CLI, so that every copied VPS system required to set new password? In other words is there easy way to get rid of current (old) password?
In other words is there easy way to get rid of current (old) password?
None that I know of, sorry :-)
I had issues and could finaly get to change the root password with this :
then
(of course change "my-new-password" with your own password) stop and restart mysql normaly
and that should work now