systemctl stop mysqld.service vi /etc/my.cnf [mysqld] skip-grant-tables skip-networking mysql -uroot -p #直接回車 flush privileges alter user root@localhost identified by 'newpassword';