mysql reset root password

Accidentally forgot the password. .

First follow this article https://blog.csdn.net/coder_jeremy/article/details/73928028

Up to this point:

Change the root password with the command: UPDATE user SET Password=PASSWORD( 'new password') where USER= 'root';

After MySQL was upgraded, the field name was changed, and the password name was changed to authentication_string, so it was changed to

UPDATE user SET authentication_string=PASSWORD('新密码') where USER='root'

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324535339&siteId=291194637