MYSQL displays Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost' as the authe when setting the password

Enter mysql with this command

sudo mysql

Enter the following command on the sql command line and press Enter, you can change the password to mynewpassword

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

exit to return to the terminal command line, enter:

exit;
sudo mysql_secure_installation

Just enter the password just now.
Choose n for any problems that arise.

insert image description here

 

Guess you like

Origin blog.csdn.net/djklsajdklsajdlk/article/details/127521874