Can anyone provide any pointers on how I could fix this error.
Web interface now shows this error and nothing else:-
V1.25.0
Options / Can't write log entry 'insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( 1390727348.044826, 'web_php', 2256, -3, 'FAT', 'SQL-ERR \'Table \'./zm/Logs\' is marked as crashed and last (automatic?) repair failed\',
statement was \'select Level, count(Level) as LevelCount from Logs where Level < 0 and from_unixtime(TimeKey) + interval 900 second > now() group by Level order by Level asc\'', '/usr/share/zoneminder/includes/database.php', 78 )': Table './zm/Logs' is marked as crashed and last (automatic?) repair failed
A google search suggested I type into mysql " USE zm; REPAIR TABLE Events; card=23 for bt787" but this did not work.
/zm/Logs is marked as crashed and last repair failed
Re: /zm/Logs is marked as crashed and last repair failed
I'd hold off typing any more random SQL statements until someone here addresses YOUR problem.eandwal wrote:A google search suggested I type into mysql " USE zm; REPAIR TABLE Events; card=23 for bt787" but this did not work.
I know too little about the internals of ZM to comment further, but YOU have a problem with the Logs table, and your found fix is something very specific for someone else fiddling with the Events table!
That doesn't sound like a plan to me.
Take care
Re: /zm/Logs is marked as crashed and last repair failed
I do not mind losing my recording history so a solution which resets the log file would be good.
Re: /zm/Logs is marked as crashed and last repair failed
It happened to me also (zm v1.29.0 on Debian Jessie) and this solution worked for me
It's a good idea to backup your database before doing the recovery.
As root user:
Stop zoneminder
#systemctl stop zoneminder.service
Stop mysql
#systemctl stop mysql.service
Run the following command (if the database name is different than zm, make appropriate changes):
myisamchk -r -f -o /var/lib/mysql/zm/Logs
Start mysql
#systemctl start mysql.service
and run
#systemctl status mysql.service - it should not report any error.
Start zoneminder and that's all.
It's a good idea to backup your database before doing the recovery.
As root user:
Stop zoneminder
#systemctl stop zoneminder.service
Stop mysql
#systemctl stop mysql.service
Run the following command (if the database name is different than zm, make appropriate changes):
myisamchk -r -f -o /var/lib/mysql/zm/Logs
Start mysql
#systemctl start mysql.service
and run
#systemctl status mysql.service - it should not report any error.
Start zoneminder and that's all.