Solve Linux MySQL Change Password: ERROR 1133 (42000): Can not find any matching row in the user table

the SET password for root @localhost = password ( ' your password ' ); 
or
the SET password for ' root ' @ ' localhost ' = password ( ' MyNewPass4! ' );
Tip: mysql database command to change the root user password prompt ERROR 1133 (42000): Can not find any matching row in the user table error 
to solve:
use mysql;
select Host,User from user;

The reason: The main reason is to modify the password条件不否

  • The set password for 'root'@'localhost'=password('MyNewPass4!'); code localhostmodification %, and database Hostfield values agree
    set password for 'root'@'%'=password('MyNewPass4!');
  • Refresh
    flush privileges;

  •  

     

Guess you like

Origin www.cnblogs.com/chuanqi1995/p/11325400.html