On some installations, you cannot execute this command until you have reset the root password. You cannot reset the root password, until you execute this command. Classic Catch-22.
One solution not mention by other responders is to temporarily disable the plugin via mysql configuration. In any my.cnf
, in the [mysqld]
section, add:
skip-validate_password=1
and restart the server. Change the password, and set the value back to 0, and restart again.