centos mysql 重置密码

查看centos版本号
cat /etc/redhat-release

/etc/my.cnf
加入

skip-grant-tables
ALTER USER 'root'@'localhost' IDENTIFIED BY '002021';
flush privileges;
posted @ 2023-01-09 14:42  冯元春  阅读(18)  评论(0)    收藏  举报