I have corruption due to power failure and mysql is complaining of a table crash. Following is the error reported by zm.
Code: Select all
SQL-ERR 'Table './zm/Events' is marked as crashed and should be repaired', statement was 'select count(if(1 and ( E.MonitorId = 1 ),1,NULL)) as EventCount0, count(if(1 and ( E.StartTime >= '2012-08-15 03:43:54' and E.MonitorId = 1 ),1,NULL)) as EventCount1, count(if(1 and ( E.StartTime >= '2012-08-14 04:43:54' and E.MonitorId = 1 ),1,NULL)) as EventCount2, count(if(1 and ( E.StartTime >= '2012-08-08 04:43:54' and E.MonitorId = 1 ),1,NULL)) as EventCount3, count(if(1 and ( E.StartTime >= '2012-07-15 04:43:54' and E.MonitorId = 1 ),1,NULL)) as EventCount4, count(if(1 and ( E.Archived = 1 and E.MonitorId = 1 ),1,NULL)) as EventCount5 from Events as E where MonitorId = '1''
Also i have tried (myisamchk --silent --force --fast --update-state -O key_buffer=64M -Osort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI ) with no results as well.
Code: Select all
george@zoneminder zm1$ myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI
myisamchk: unknown option '-O'
george@zoneminder zm1$
Thanks for any help .