# 方法一
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;








网友评论