Error: DBD::mysql::db failed: Table ‘./eximstats/failures’ – Fix
If you have received the following database error in your WHM control panel, you can follow below steps to resolve the error.
Error from delivery reporter: DBD::mysql::db selectall_arrayref failed: Table './eximstats/failures' is marked as crashed and last (automatic?) repair failed
Note :- Do ensure that you have the backup of all the necessary databases
Try to run below command
mysqlcheck --repair eximstats
If you get below error as an output, the ‘failures’ table within eximstats is corrupted
eximstats.defers OK eximstats.failures error : Can't create new tempfile: './eximstats/failures.TMD' status : Operation failed
It’s unable to be repaired. So, you will run below commands from MySQL prompt to recreate it.
mysql use eximstats; drop table failures;
If you want to clear the other databases out, you can run below commands from MySQL prompt after the above steps.
Note :- The process will wipe out existing eximstats if you plan on using it for Mail Reports so keep that in mind
mysql use eximstats; TRUNCATE TABLE sends; TRUNCATE TABLE defers; TRUNCATE TABLE smtp;
That’s it 🙂
Please check the issue and let me know the result 🙂