systemctl stop mariadb
mysqld_safe --skip-grant-tables &
再开一个窗口执行
mysql -u root
use mysql
update user set password=password("12345") where user="root";
flush privileges;
exit;
systemctl start mariadb
mysql -uroot -p12345
systemctl stop mariadb
mysqld_safe --skip-grant-tables &
再开一个窗口执行
mysql -u root
use mysql
update user set password=password("12345") where user="root";
flush privileges;
exit;
systemctl start mariadb
mysql -uroot -p12345
本文标题:MySQL忘记root密码
本文链接:https://www.haomeiwen.com/subject/hrsoictx.html
网友评论