I was being lazy and attempted to move my UPS during production when I hit the front shutdown switch. Needless to say, I crashed Zoneminder during a busy evening where it was doing its job monitoring the building. There was much activity going on outside. Yes I know..and I can hear you saying "Now that was stupid!" It was and I accept my fate. I could not get behind myself to deliver a good kick.
However, it rebooted and Zoneminder started. I thought I was OK until I tried to view some events. I got a web server error saying that the operation could not be executed. Basically, this means that there is database corruption. In addition there were bogus events that were created for actions but never had a chance to finish because that goofy genius kicked out the plug.
I use UBUNTU distributions so it makes it easy to get the tools you need to fix this.
There are several ways to fix database corruption. The easy way is with phpmyadmin. For Debian installs, use "Sudo apt-get install phpmyadmin.
After a successful install, Stop Zoneminder (open the ZM console or use the command line) then open your browser to: 'http://localhost/phpmyadmin'. You will need the root (mysql root user) user and password you created when you installed MySQL or when you installed Zoneminder. If you lost it, you will have to take other steps to recover that password. Do not fret. There are ways to get passwords changed or recovered.
When you get phpmyadmin open, find and select the ZM database on the left column and then on the right find and select "select all" then to the right find and select "repair all" With proper rights it will return with a list of your tables and no errors.
Go back to Zoneminder and start it. You should be able to edit events again. Delete those unfinished events.
phpmyadmin runs as a web app and can be a security risk to your machine. I decided to leave it on my server for now. However, you can install it on another machine that you keep off line until you need it. Check out it's other features it is a pretty good tool to have.
I hope this will help somebody.
Crashed? Lost Power? Great tool: phpmyadmin
- theorganloft
- Posts: 29
- Joined: Fri Mar 14, 2008 12:29 pm
- Location: Atlanta, Georgia, USA
Crashed? Lost Power? Great tool: phpmyadmin
Last edited by theorganloft on Sat May 03, 2008 12:39 am, edited 1 time in total.
"Organs are my passion but music is my goal"
"Open Source and Open Mind help one to Open mine"
"Open Source and Open Mind help one to Open mine"
Some corrections...
First, this is covered here.
http://www.zoneminder.com/wiki/index.ph ... i_fails.3F
Second, it is 'phpmyadmin' not 'phpmysqladmin' for legal reasons.
Third, it is massively insecure, so change the directory name or also 'apt-get install fail2ban' and configure it!
But yes, it is damn handy.
First, this is covered here.
http://www.zoneminder.com/wiki/index.ph ... i_fails.3F
Second, it is 'phpmyadmin' not 'phpmysqladmin' for legal reasons.
Third, it is massively insecure, so change the directory name or also 'apt-get install fail2ban' and configure it!
But yes, it is damn handy.
- theorganloft
- Posts: 29
- Joined: Fri Mar 14, 2008 12:29 pm
- Location: Atlanta, Georgia, USA
-
- Posts: 678
- Joined: Wed Dec 16, 2009 4:32 pm
- Location: Israel
Hi,
You can switch the database or some tables from it to InnoDB and that way, you won't ever have to repair the tables\database ever again.
I wrote a little about my experience with ZM and InnoDB.
You can read my thread here:
http://www.zoneminder.com/forums/viewtopic.php?t=15473
mastertheknife.
You can switch the database or some tables from it to InnoDB and that way, you won't ever have to repair the tables\database ever again.
I wrote a little about my experience with ZM and InnoDB.
You can read my thread here:
http://www.zoneminder.com/forums/viewtopic.php?t=15473
mastertheknife.