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 am trying to install MySQL with apache on my ubuntu digital ocean server But whenever I am running sudo mysql_secure_installation command I am facing some error like 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. I have researched about this error and finally, I have fixed it. Here is the full Guide on How I solved this error.

How To Solve 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.

As the error is mentioned itself that you need to run ALTER USER command and it will fix your error.

Solution 1: Run ALTER USER command

This error occurs while you don’t have a password for root User and You are trying to install mysql_secure_installation To fix this error you need to set the Password for the root user with mysql_native_password and it will Fix Your Error. Just run this command.

sudo mysql

Now Run Alter User command with your new password.

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

And now You are able to run the mysql_secure_installation command.

sudo mysql_secure_installation

And this is How I solved My Error I Hope Your error is fixed. Please comment below if your error is solved If You are facing an error Please comment below we will try to solve your error. Thanks.

How To Solve 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.

This error occurs while you don’t have a password for root User and You are trying to install mysql_secure_installation To fix this error you need to set the Password for the root user with mysql_native_password and it will Fix Your Error. Just run this command: sudo mysql Now Run Alter User command with your new password: ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password by ‘my_new_password’; And now You are able to run the mysql_secure_installation command: sudo mysql_secure_installation And this is How I solved My Error I Hope Your error is fixed

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

This error occurs while you don’t have a password for root User and You are trying to install mysql_secure_installation To fix this error you need to set the Password for the root user with mysql_native_password and it will Fix Your Error. Just run this command: sudo mysql Now Run Alter User command with your new password: ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password by ‘my_new_password’; And now You are able to run the mysql_secure_installation command: sudo mysql_secure_installation And this is How I solved My Error I Hope Your error is fixed

Also Read

Leave a Comment