How to Solve / Fix MySQL root password setup error in ubuntu

While setting MySQL password for root user during MySQL installation in ubuntu, you may get an error. In this tutorial you will learn, How to Solve / Fix the MySQL root password setup error in ubuntu?

… 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.

mysql root password setting error in ubuntu

Solve / Fix MySQL root password setup error in ubuntu

To fix the MySQL root password setup error in ubuntu stated above use the following command in the terminal.

 sudo mysql
 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'programbrpassword';

solve-Fix-MySQL-root-password-setup-error-in-ubuntu

See Also

Install MySQL on Ubuntu 22.04
Install MySQL on Ubuntu 20.04
Permanently Remove, Uninstall MySQL from Ubuntu
Fix MySQL root password setup error in ubuntu
Reset or Change the MySQL root Password on Ubuntu