My ZoneMinder DB was corrupt with a bad CONFIG table. This told me how t fix it.This has happened two times now. At least the second time I had a DB backup so instead of re-initializing the config table I re-loaded it.
First check if your disk is out of space.
These are the steps to recover...
My sql file is archived at /mnt/droboShare/media2/bak/zm/zm_recreateConfig.sql