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'
mysql5.7.22版本修改root密码
原创
©著作权归作者所有:来自51CTO博客作者cqs_jition的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:rm删除指定文件外其它文件
下一篇:centos7内核数字及字母含义

提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
linux 下载mysql5.7.22
一
mysql linux 上传服务器 -
mysql5.7.22源码编译安装
mysql5.7.22源码编译安装
mysql 源码编译 -
找回root密码-centos7版本
找回root密码-centos7版本
回车键 密码修改 centos linux 重启 -
kali linux 2022.1版本root密码重置
kali Linux 2022.1版root密码重置
kali linux kali root密码重置