[Fixed] Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost

In this article, we cover how to get rid of the error: Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost. We were in the midst of installing WordPress and trying to set up MySQL. The command that led to the issue was:

mysql_secure_installation

It prompts us for the root’s password to set up various security options. And, when we enter a password, it returns the error.

Note: Following operations require Administrative Rights. If you don’t have the required rights, then contact your System Administrator for assistance.

[Fixed] Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost

If you go through the error once, it says there is an issue with the Authentication Method. We won’t cover here what the issue here is. It can be easily resolved by changing the Authentication Method to mysql_native_password.

At this stage, if you have already run the mysql_secure_installation command, then you would be stuck in the terminal. So, we need to first terminate the process. Therefore, open another instance of the terminal and issue the following command:

sudo killall -9 mysql_secure_installation

Thereafter, start the MySQL client:

sudo mysql

And, to change the authentication method, run the following:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YOURPASSWORD';

Replace YOURPASSWORD with the password you wish to set. And, once done you should see the Query OK message. Now, exit.

exit

And, try running the mysql_secure_installation command again. This time around if it prompts you for the password, entered the one you used in place of YOURPASSWORD.

sudo mysql_secure_installation

In conclusion, we have covered here how to fix the error: SET PASSWORD has no significance for user ‘root’@’localhost.

Similar Posts