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.
Contents
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.
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
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
- [ERROR] Invalid syntax in configuration ini file.
- A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received
- How to fix “zsh: command not found: python” error? (macOS Monterey 12.3, python 3.10, Atom IDE, atom-python-run 0.9.7)
- Good alternative to Pandas .append() method, now that it is being deprecated?