You must reset your password using ALTER USER statement before executing this statement

I am a Mac computer, and this problem occurred in the process of using mysql. The
solution is as follows
: Step 1: SET PASSWORD = PASSWORD('your new password');

Step 2: ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
Step 3: flush privileges;

Complete the above three steps to log out and log in again, just use the newly set password. Except for the red one that is changed to a new password, you can enter the rest as it is.

Guess you like

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