How to Repair MySQL Database in cPanel, WHM

  1. If a specific MySQL Database has error you can login to WHM and come to repair MySQL database and choose the database and repair (see the picture).
  2. To repair all databases you need to ssh into your server and su root and run these
    #repair all databases
    mysqlcheck –all-databases -r
    #analyze database which will help in better optimization
    mysqlcheck –all-databases -a
    #optimize database to save space
    mysqlcheck –all-databases -o
  3. It is good to do the above in a shell script daily