I\'m setting up a new server and keep running into this problem.
When I try to login to the MySQL database with the root user, I get the error:
step 1. sudo mysql -u root -p
sudo mysql -u root -p
step 2. USE mysql;
USE mysql;
step 3. ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'admin';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'admin';
Here 'admin' is your new password, yo can change it.
step 4. exit
exit
Thanks. You are done.