mysql5.7.22版本修改root密码

mysql5.6之前修改密码(字段password) mysql> use mysql; mysql> update user set password=password('123') where user='root' and host='localhost'; mysql> flush privileges; mysql 5.7.22版本修改密码(字段是authentication_string) mysql> use mysql; mysql>update user authentication_string=password('root123') where user='root' mysql> flush privileges; 使用mysqladmin工具 格式:mysqladmin -u用户名 -p旧密码 password 新密码 [cqs@centos7 ~]$ mysqladmin -uroot -proot password 'root123'
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章