mysql修改密码

qwer78 / 2023-05-12 / 原文

5.6版本
update mysql.user set password = password('123456') where user='root';

5.7版本
update user set authentication_string = password('123456') where user='root';

FLUSH PRIVILEGES;