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.
- The first one is to Use a Strong Password Just Like Addy@789**$ This Password Will satisfy current policy requirements.
- The second one is just Uninstall the validate_password plugin with these two commands
- mysql -h localhost -u root -p
- and then
- uninstall the plugin validate_password;
- The third solution is You can set the validate_password.policy to do so Just run
- sudo mysql
- and Then
- 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
Thank You so much Bro Saved My Day. God Bless You.
It’s my Pleasure to Help You. Thank You For Your Valuable words.
The solution worked for me, I’m an Ubuntu novice, thanks
It’s my Pleasure to Help You Danjork. Thank You For Your Valuable words.
After this solution, when I tried to login to mysql even with the same password, i am unable to login.
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
it worked, thanks.
It’s my Pleasure to Help You Blessing Erinfolami. Thank You For Your Valuable words.
It worked !
Thank you very much !
It’s my Pleasure to Help You S. Attanayake. Thank You For Your Valuable words.
Thanks It Worked
It’s my Pleasure to Help You Robert. Thank You For Your Valuable words.
Thank you very much.
It’s my Pleasure to Help You Aléctor. Thank You For Your Valuable words.
Your solution perfectly work brother thanks for the solution
It’s my Pleasure to Help You gaurav. Thank You For Your Valuable words.
Thankssss Worked Perfactlyyyyyyyy
It’s my Pleasure to Help You Lijo. Thank You For Your Valuable words.
Thanks
It’s my Pleasure to Help You Akash. Thank You For Your Valuable words.
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?
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;
Top. Solution my problem! Thanks!
It’s my Pleasure to Help You Erasmo. Thank You For Your Valuable words.
Thanks
It’s my Pleasure to Help You Tushar. Thank You For Your Valuable words.
Thanks Bro!
It’s my Pleasure to Help You Bro. Thank You For Your Valuable words.
love you
❤️
Thanks bro it was really getting crazy then got helped from you )))
It’s my Pleasure to Help You joand. Thank You So Much For Your Valuable words.