MySQL5.7修改密码

平时没怎么用过Mysql,今天有个小程序需要用一下,但是忘记怎么修改用户密码了,网上搜索一下,记录一下。

1 update user set authentication_string = password('root'), password_expired = 'N', password_last_changed = now() where user = 'root';

重启MySQL服务后生效。

原文链接:https://www.cnblogs.com/activiti/p/7810166.html

猜你喜欢

转载自www.cnblogs.com/biaoge140/p/8995672.html