美文网首页
mysql修改密码

mysql修改密码

作者: 云扬_fb42 | 来源:发表于2019-04-10 17:01 被阅读0次

方法1: 用SET PASSWORD命令 

首先登录MySQL。 

格式:mysql> set password for 用户名@localhost = password('新密码'); 

方法2:用UPDATE直接编辑user表 

首先登录MySQL。 

mysql> use mysql; 

mysql> update user set authentication_string=password('123') where user='root' and host='localhost'; 

mysql> flush privileges; 

相关文章

网友评论

      本文标题:mysql修改密码

      本文链接:https://www.haomeiwen.com/subject/kadoiqtx.html