mysql修改root密码
update mysql.user set password='newpassword' where user='root';
update mysql.user set password=PASSWORD('newpassword') where User='root';
这两条修改密码的方式在mysql8.0以上就不起作用了
正确方式:
ALTER user 'root' IDENTIFIED BY 'newpassword';
update mysql.user set password='newpassword' where user='root';
update mysql.user set password=PASSWORD('newpassword') where User='root';
这两条修改密码的方式在mysql8.0以上就不起作用了
正确方式:
ALTER user 'root' IDENTIFIED BY 'newpassword';