When I was trying to install the MySQL on Ubuntu 20.04 and run the below command:
sudo mysql_secure_installation
when run the command “sudo mysql_secure_installation”, Below error is shown:
…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.`
How to Fix “SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication method used doesn’t store authentication data in the MySQL server” Error?
To fix the “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.” Error.
First of all, run the command “sudo MySQL” for root access without any login password requirement, then change the authentication parameter using command “ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password by ‘mynewpassword'” where ‘mynewpassword’ is the password you set for root user.
Once authentication password has been changed, you are good to run the command “mysql_secure_installation” for installing the MySQL on Ubuntu 20.04 version.
Below is the step by step procedure to fix the “SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication method used doesn’t store authentication data in the MySQL server”:
To fix the “Error SET PASSWORD has no significance for user ‘root’@’localhost’ in MySQL” Error, First of all Change the Authentication parameter using below command:
sudo MySQL
This command will allow you to login as a root user without using any password.
Then use below command to change the authentication parameter:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'mynewpassword'
where ‘mynewpassword’ is the new password you have set for root user, it would help to access and run installation again.
Now run the command “mysql_secure_installation” to start MySQL installation, below is the command to start:
mysql_secure_installation
once asked, enter the new set password for root user you recently did.
Above procedure should help you to fix the “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.” Error.
Conclusion
To fix the “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.” Error.
First of all, run the command “sudo MySQL” for root access without any login password requirement, then change the authentication parameter using command “ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password by ‘mynewpassword'” where ‘mynewpassword’ is the password you set for root user. once authentication password has been changed, you are good to run the command “mysql_secure_installation” for installing the MySQL on Ubuntu 20.04 version.