Hi there. When we open MailWatch, we see this error:
Error executing query:
Table 'maillog' is marked as crashed and last (automatic?) repair failed
...followed by a bunch of SQL code.
All related scripts (MailScanner, ClamAV, etc.) appear to be up-to-date. Is there a recommended way to fix this issue?
Thanks so much for your help!
Kathryn
MailWatch Broken
Try repairing the database in WHM (SQL Services - Repair a Database). If that doesn't work, you may need to remove the mailscanner database and re-create it:
Code: Select all
mysql -e "drop database mailscanner"
perl /usr/local/cpanel/whostmgr/docroot/3rdparty/mailwatch/install/mwadd.pl
Hi Sarah, thanks so much. In the end, the problem we were having is now moot as we had a server disaster (hardware failure) over the last 48 hrs. and Jonathan just re-installed MailScanner as well as the complete cPanel service package. But good to know there may be a fix if we ever encounter that MailWatch problem again!
Kathryn
Kathryn
Re: MailWatch Broken
For some reason mailscanner did not show up as one of the database under the WHM mysql Repair a database option.
If you need to repair it from the command line, this worked for me:
1) Shell into the server as root
2) See what mysql says about the database (just a look-see, no data changed):
/usr/bin/mysqlcheck -v mailscanner
the -v just tells it to be verbose
3) Actually repair any broken/crashed tables
/usr/bin/mysqlcheck -rv mailscanner
the -r tells it to do the repair. You could also use -orv to repair and optimize the tables, but why confuse things when there is a problem.
If you need to repair it from the command line, this worked for me:
1) Shell into the server as root
2) See what mysql says about the database (just a look-see, no data changed):
/usr/bin/mysqlcheck -v mailscanner
the -v just tells it to be verbose
3) Actually repair any broken/crashed tables
/usr/bin/mysqlcheck -rv mailscanner
the -r tells it to do the repair. You could also use -orv to repair and optimize the tables, but why confuse things when there is a problem.