. 1 1.vim / etc / My. CNF 2 [mysqld] . 3 Skip-Grant-Tables # # append this row, skip the permissions table . 4 . 5 2. Restart MySQL . 6 systemctl the restart mysqld . 7 . 8 3. MySQL login MySQL . 9 MySQL > use MySQL ; 10 MySQL > = the UPDATE User password the SET password ( 'zha123456') the WHERE = the User 'the root' ; . 11 MySQL > the flush privileges; 12 is MySQL > quit 13 is 14 4. recovery profile My. CNF 15 Vim / etc / My. CNF 16 [mysqld] . 17 Skip-Grant-Tables # # remove this line, continue to check permission table 18 is . 19 5. restart MySQL 20 is systemctl the restart mysqld