close

[Solved] Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication method used doesn’t store authentication data in the MySQL server

I was trying to install mysql_secure_installation in Ubuntu But I am facing the following error Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication method used doesn’t store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters.. We are going to Learn about All Possible Solutions So Lets Get Start with This Article.

Solution 1: Follow these steps

First of all, You need to change the authentication parameters to do so just run this command first.

sudo mysql

Then run This ALTER Query to change the authentication parameters.

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'mynewpassword';

And now, you are able to run the mysql_secure_installation command.

sudo mysql_secure_installation

Now, Your error must be solved. Thanks.

Update: 28-06-2022

If You Face Below Error After ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password by ‘mynewpassword’; This Command.

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

Then there is Three Possible Solution For This Error.

  1. The first one is to Use a Strong Password Just Like Addy@789**$ This Password Will satisfy current policy requirements.
  2. The second one is just Uninstall the validate_password plugin with these two commands
    1. mysql -h localhost -u root -p
    2. and then
    3. uninstall the plugin validate_password;
  3. The third solution is You can set the validate_password.policy to do so Just run
    1. sudo mysql
    2. and Then
    3. SET GLOBAL validate_password.policy=LOW;

And Now Your ERROR 1819 (HY000): Your password does not satisfy the current policy requirements is Solved.

Solution 2: ALTER User with mysql_native_password

You just need to Update the User With the mysql_native_password method. Just Set the Password for your root user with the help of mysql_native_password. Just Run this command in your terminal.

# Open MySql From terminal
sudo mysql

Then Update the user With the mysql_native_password method. Just like Below.

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'mynewpassword';

Now Your error will be solved Successfully. Thank You So Much For Visiting Our Website.

Conclusion

You need to change the authentication parameters for the root user and then your error will be solved. Hope Our Article helped you to solve this error. Comment below if you are still facing this issue. Also, Comment below on which solution worked for you.

Also, Read

32 thoughts on “[Solved] Failed! Error: SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication method used doesn’t store authentication data in the MySQL server”

    • Hello Utpal Manna,
      After this Solution Try to lOgin in this way. Just run this command

      sudo mysql -u root -p //enter
      // enter your password after run above command

      now you will be login successfully

      Reply
  1. When I tried the ‘ALTER USER..’ step it printed ‘ERROR 1819 (HY000): Your password does not satisfy the current policy requirements’, do you know how to solve this?

    Reply
    • There Is Three Possible Solution For This.
      – The first one is to Use a Strong Password Just Like Addy@789**$ This Password Will satisfy current policy requirements
      – Second one is Just Uninstall validate_password plugin with this two command 1. mysql -h localhost -u root -p and then uninstall plugin validate_password
      – The third solution is You can set validate_password.policy to do so Just run sudo mysql and Then SET GLOBAL validate_password.policy=LOW;

      Reply

Leave a Comment