Step 1: open my.cnf configuration file and add skip-gran-tables
. CNF cannot be found, so you can edit a
by yourself in /etc. Step 2: restart mysql
step 3: after login, leave the password empty and modify it. Otherwise, an error will be reported
Update User Set Authentication_string = ‘” Where user=’ root ‘;
ALTER USER ‘root’ @’ localhost ‘IDENTIFIED WITH mysql_native_password BY’ password ‘;
ALTER USER ‘root’ @’ localhost ‘IDENTIFIED WITH mysql_native_password BY’ password ‘