How to fix error Table upgrade required. Please do "REPAIR TABLE" (2045019)
If you have upgraded Zimbra Collaboration Server (ZCS) to version 7 and encounter the following error:
Table upgrade required. Please do "REPAIR TABLE" (2045019)
It comes from mysqlcheck, as in this example:
Database errors found.
/opt/zimbra/mysql/bin/mysqlcheck --defaults-file=/opt/zimbra/conf/my.cnf
-S /opt/zimbra/db/mysql.sock -A -C -s -u root --password=XXXXXXXX
mboxgroup1.appointment
error : Table upgrade required. Please do "REPAIR TABLE `appointment`" or dump/reload to fix it!
mboxgroup1.data_source_item
error : Table upgrade required. Please do "REPAIR TABLE `data_source_item`" or dump/reload to fix it!
mboxgroup1.imap_folder
error : Table upgrade required. Please do "REPAIR TABLE `imap_folder`" or dump/reload to fix it!
This occurs because the upgraded Zimbra version uses a newer MySQL version. You therefore need to run the migration script, following these steps:
- Stop Zimbra with:
zmcontrol stop - Restart MySQL with:
mysql.server stopmysql.server start - Then run the following command as the root user:
/opt/zimbra/libexec/scripts/migrate20100913-Mysql51.pl - As the zimbra user, stop the MySQL server with:
mysql.server stop - Start the Zimbra server with:
zmcontrol start
Impact/Risks This procedure causes downtime.