Page 1 of 1

Reset events and frames ID number

Posted: Tue Jan 29, 2008 9:48 pm
by gola10
I have ZM 1.22.3 installed from ZM Mandriva 2007 livecd. This computer was attacked by a hacker so i better reinstall. But i want to keep y settings.
One way to go is to backup the database and restore it on the new installation. (at least that i what i plan. But would like to reset reset frame ID number and Events ID number. Frames number is already 8 digits and events 6 digits.
Is there a script to reset this databases and the autoincrement field?

Posted: Wed Jan 30, 2008 3:49 pm
by Lee Sharp
Start here. http://www.zoneminder.com/forums/viewtopic.php?t=11005 However, changing things can add some different problems. Be careful.

Posted: Thu Feb 07, 2008 9:38 pm
by zoneminder
Although you can reset the events and frame indexes etc this will only work if you do not have entries in the DB already. If you add even just one event with an id of 1000000 then the next one will be 10000001 regardless. If you have an empty DB you can reset the counts with

Code: Select all

alter table Events auto_increment=1;
etc.

A bit more detail

Posted: Fri Aug 15, 2008 12:08 pm
by Alan87i
Could someone please explain a little further where or what a fellow is to do with this code ( alter table Events auto_increment=1 ) to make use of it?
Thanks

Posted: Sat Aug 16, 2008 1:59 pm
by MikeH
It's a SQL statement that could be run against the ZM database using phpMyAdmin or some similar tool.