I want to give it to you today.
mysqlThe root user adds a password and executes in MySQL according to the online tutorials:
mysql> update mysql.user set password='567890' where User='root';
After restarting mysqld, I used
mysql -uroot -p'567890'Landing, result landing does not go in
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Ask your brothers to help you see what is the reason and how to solve it.
The password is encrypted (using the PASSWORD function):
update mysql.user set password=PASSWORD('567890') where User='root';
Stop the Mysql service and start with mysql_safe with the command of / usr/bin/mysqld_safe — skip-grant-tables &, then log in without a password.