提示:命令修改mysql数据库root用户密码提示ERROR 1133 (42000): Can't find any matching row in the user table错误
原因:主要原因是修改密码的条件不否
将
set password for 'root'@'localhost'=password('MyNewPass4!');
修改为
set password for 'root'@'%'=password('MyNewPass4!');
代码中的localhost修改%,与数据库Host字段值一致
- 刷新
flush privileges;