mysql-修改重置密码
已知密码,修改密码
mysqladmin -uroot -p'原本密码' password '新密码'
不知密码,修改密码
systemctl stop mysqld
# /etc/my.cnf 添加跳过权限表
[mysqld]
skip-grant-tables
systemctl start mysqld
mysqladmin -uroot -p'原本密码' password '新密码'
systemctl stop mysqld
# /etc/my.cnf 添加跳过权限表
[mysqld]
skip-grant-tables
systemctl start mysqld