mysql5.7修改密码

# 方法一
update mysql.user set authentication_string=password('123qwe') where user='root' and Host = 'localhost';

# 方法二
alter user 'root'@'localhost' identified by '123';

# 方法三
set password for 'root'@'localhost'=password('123');

# 最后需要刷新权限
flush privileges;

你可能感兴趣的:(mysql5.7修改密码)