How to Repair eximstats on cPanel/WHM

Today you will learn how to repair eximstats on cPanel. Sometimes Eximstats, the cPanel daemon in charge of generate stats for email usage, stops working. In order to get your email stats working again, we will have to delete the current MySQL tables and re-create the stats again.

How can I repair eximstats on cPanel?

At the logs, you may find this kind of errors:

Error: DBD::mysql::db failed: Table './eximstats/failures'

In order to fix this, we will need to drop the MYSQL ‘failures’ table from the ‘eximstats’ database

use eximstats; drop table failures;

After that run the following command to rebuild Exim stats:


After that, your failures table should be working again. However, if you also wish to clear the other eximstats tables, you can do it, just keep in mind that this will delete your existing eximstats information.

This can be done using the following command:

mysql use eximstats; TRUNCATE TABLE sends; TRUNCATE TABLE defers; TRUNCATE TABLE smtp;

The output should be something like:

eximstats.defers OK
eximstats.failures OK
eximstats.sends OK
eximstats.smtp OK


At this point you should know how to repair eximstats on cPanel servers to get all the statistics working again for your email users. Please let us know if you know other ways to restore eximstats after MySQL corruption on anyone of its tables.

Further reading:  Exim

About the Author: Santiago Borges

Experienced Sr. Linux SysAdmin and Web Technologist, passionate about building tools, automating processes, fixing server issues, troubleshooting, securing and optimizing high traffic websites.

Leave a Reply

Your email address will not be published. Required fields are marked *