MySQL5.7 修改密码

MySQL5.7 修改密码

mysql> update mysql.user set authentication_string = password('新密码') where user='用户名' and Host = 'localhost';
mysql> flush privileges;
mysql> quit;

MySQL5.7 中 mysql 库中的 user 表中取消了 password 字段,代之的是将加密后的密码存放到 authentication_string 字段中。

posted @ 2016-07-05 14:04  hapday  阅读(519)  评论(2编辑  收藏  举报