mysql5.7忘记root密码
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';
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';