Help with mysql crash on Ubuntu running zoneminder

Forum for questions and support relating to 1.35.x development only.
Post Reply
CancunManny
Posts: 6
Joined: Fri Dec 13, 2019 2:37 am

Help with mysql crash on Ubuntu running zoneminder

Post by CancunManny » Thu May 28, 2020 3:46 am

Hello, I know this is probably not the best spot to ask this question since it is mostly ubuntu related, but perhaps one of you has ran onto this issue before and can point me on the right direction.

I am running ubuntu 18.04 desktop, with zoneminder on the background. In average my PC gets a power outage about once a month. More often than not there is no issue, but twice now after a power outage at reboot mysql won't start. Last time it happened I had to re install EVERYTHING (ubuntu and all) from scratch. Rather not have to do that again if possible. (This time I do plan to create backups so I can just restore from backup )

So basically everything was running great, power went out, and at reboot mysql won't start so ZM won't start either. If I try to remove mysql i get an error because of zoneminder. If I try to re install mysql same thing I get an error because of zm. I can't seem to "stop" ZM since it isn't running.

Any help would be greatly appreciated

CancunManny
Posts: 6
Joined: Fri Dec 13, 2019 2:37 am

Re: Help with mysql crash on Ubuntu running zoneminder

Post by CancunManny » Mon Jun 01, 2020 6:50 pm

Bump

bbunge
Posts: 2667
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Help with mysql crash on Ubuntu running zoneminder

Post by bbunge » Tue Jun 02, 2020 1:43 am

Your best bet is to invest in a UPS to avoid the crash when the power fails. Other than that you can do a backup of the MySQL databases and restore them after the power failure. You might also try Mariadb (recommended). I do not run a desktop version of Ubuntu and with that use Webmin to do the maintenance tasks. Might sound like overkill but it is a great tool to manage a database server. PHP MyAdmin also works well.

CancunManny
Posts: 6
Joined: Fri Dec 13, 2019 2:37 am

Re: Help with mysql crash on Ubuntu running zoneminder

Post by CancunManny » Tue Jun 02, 2020 2:54 am

Thank you. Yes I know a decent UPS would be a good solution, but at the time (because of income problems) that is not an issue.

The issue seems to be with the sql server (if that is the right name). I can't remove it to do a clean install.

SkippyDo
Posts: 186
Joined: Mon Nov 20, 2017 6:49 pm

Re: Help with mysql crash on Ubuntu running zoneminder

Post by SkippyDo » Wed Jun 03, 2020 5:01 pm

You have to identify WHY the database server isn't starting. Most probable reason is that databases are corrupted. If so then there's no reason to uninstall anything: rather, it's about wiping out the database and rebuilding with a backup.

When I was planning for my ZM system I had a UPS budgeted in from the get-go: I live out in the country, power outages are a fact of life; it's not just power outages but also voltage fluctuations that one has to protect against/for. This is basic stuff if one is serious about uptime.

I totally empathize with the desire to not have to install from scratch. Just got done doing that after upgrading my OS and ZM, after running 1.30.4 for several years: in my case my database backups didn't work out for me.

burger
Posts: 62
Joined: Mon May 11, 2020 4:32 pm

Re: Help with mysql crash on Ubuntu running zoneminder

Post by burger » Fri Jun 05, 2020 7:19 am

Is there any evidence that db corruptions are more frequent on ZM > 1.32?
fastest way to test streams:
ffmpeg -i rtsp://<ipaddress>:554/path output.mp4
from terminal, and run through paths on ispydb or in zm hcl

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest