Database upgrade fails

Forum for questions and support relating to the 1.32.x releases only.
SkippyDo
Posts: 219
Joined: Mon Nov 20, 2017 6:49 pm

Re: Database upgrade fails

Post by SkippyDo »

Not certain if my situation has any connection with th OP's, but I'm going to toss it in here in case it may. MY issue isn't due to an upgrade (full, fresh install, Debian sid). Due to who knows what, my computer keeps becoming inaccessible (headless, so I have to resort to resetting power to then bring it back up and dig around for what caused the lock-up: I'm having no success here, I suspect it's my wireless interface that's dropping out [it serves as my only acces to the server]).

I recently had to reboot, and only after moving ib_logfile0 and ib_logfile1 out of the way was I able to start mysql. zm, however, will not start.

sudo systemctl status zoneminder.service
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-01-26 19:48:01 PST; 4s ago
Docs: http://zoneminder.readthedocs.org/en/latest/
Process: 5391 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255/EXCEPTION)

Jan 26 19:48:01 mandeportal systemd[1]: Starting ZoneMinder CCTV recording and surveillance system...
Jan 26 19:48:01 mandeportal zmpkg.pl[5391]: DBD::mysql::st execute failed: Lost connection to MySQL server during query at /usr/share/perl5/ZoneMinder/Logger.pm l
Jan 26 19:48:01 mandeportal zmpkg.pl[5391]: DBD::mysql::st execute failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
Jan 26 19:48:01 mandeportal zmpkg[5391]: ERR [Can't execute log entry 'INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VA
Jan 26 19:48:01 mandeportal zmpkg[5391]: FAT [Can't execute: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)]
Jan 26 19:48:01 mandeportal systemd[1]: zoneminder.service: Control process exited, code=exited, status=255/EXCEPTION
Jan 26 19:48:01 mandeportal systemd[1]: zoneminder.service: Failed with result 'exit-code'.
Jan 26 19:48:01 mandeportal systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.

All zm tables except Logs are fine. Attempting to check this table produces:

sudo mysqlcheck zm Logs
mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ... '

If I had to guess I'd guess that I needed to drop and recreate the Logs table?

My thread on my problem is viewtopic.php?f=38&t=28016.
SkippyDo
Posts: 219
Joined: Mon Nov 20, 2017 6:49 pm

Re: Database upgrade fails

Post by SkippyDo »

I ended up dropping the Logs table and recreating (using code from zm DB create script).
Post Reply