Skip to content

MySQL root password setup error

  • by

When you start the “mysql_secure_installation” and in the first step you get an 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“, then here is the answer for you.

first thing is to kill the current “mysql_secure_installation” task

sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'Choose-your-own-password';
exit

Then restart the “mysql_secure_installation” with the command

sudo mysql_secure_installation

Login with the new password and complete the steps in the wizard.

Leave a Reply

Your email address will not be published. Required fields are marked *