1, Myisamchk
The MySQL server must be temporarily stopped using MYISAMCHK. For example, we need to overhaul the Discuz database. Perform the following actions:
# service MySQL stop (stop MySQL);
# myisamchk-r/Database file absolute path/*myi
# service MySQL Start
Myisamchk automatically checks for and repairs index errors in the datasheet.
2, Mysqlcheck
With Mysqlcheck you do not need to stop MySQL for hot fixes. Action steps are as follows:
# Mysqlcheck-r Discuz.*
# service MySQL stop (stop MySQL);
# myisamchk-r/Database file absolute path/*myi
# service MySQL Start
Myisamchk automatically checks for and repairs index errors in the datasheet.
Note that, whether it is Myisamchk or mysqlcheck, do not normally use the-F force fix, the-f parameter deletes some of the error data to try to fix when the general fix fails. Therefore, you should not use-f unless you have to.