MySQL如何修改密码

wzy_yang 2018-02-23 04:55:14
如何修改数据库的密码,尽量不繁琐。
...全文
1386 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
jeanette_zlj 2018-03-15
  • 打赏
  • 举报
回复
use mysql update user set password=password("new_password") where user="user_name"; flush privileges; 或者 alter user 'user_name'@'localhost' identified by 'new_password'; flush privileges; 或者 update mysql.user set authentication_string=password('new_password') where user='user_name' ; flush privileges;
Rotel-刘志东 2018-02-24
  • 打赏
  • 举报
回复
update user set password=password('newpass') where user='用户名'; flush privileges;
yuman_23 2018-02-24
  • 打赏
  • 举报
回复
SET PASSWORD FOR $user=PASSWORD('passwd');
rucypli 2018-02-24
  • 打赏
  • 举报
回复
5.6以及以前 update mysql.user set password=password('newpass') where user='用户名'; flush privileges; 5.7版本 update mysql.user set password=authentication_string('newpass') where user='用户名'; flush privileges;

56,677

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧