mysql修改密码

5.6版本
SET PASSWORD FOR 'root'@'%' = PASSWORD('123456');
FLUSH PRIVILEGES;

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

posted @ 2023-05-11 20:10  qwer78  阅读(28)  评论(0)    收藏  举报