老版mysql 5.7 修改密码方式为: ALTER USER USER() IDENTIFIED BY '新密码';
尝试几种网上得方法后发现,mysql80版本不适合,新方法为:
1、登陆: use mysql;
2、修改密码:alter user 'root'@'localhost' identified with mysql_native_password by 'root;
3、刷新权限:flush privileges;