MySQL5.7修改用户密码


在MySQL 5.7 password字段已从mysql.user表中删除,新的字段名是“authenticalion_string”.

更新root的密码

格式:

  update user set authentication_string=password('新密码') where user='root' and Host='localhost';

例:

选择数据库

use mysql;

修改密码

update user set authentication_string=password('123.com') where user='testuser' and Host='%';

刷新权限

flush privileges;


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM