Page 1 of 1

[Solved] Is there any way to reset all id's, stored files counters?

Posted: Sat Jan 28, 2023 1:03 am
by Toberius
Hi, like topic said.

I'm new run and test ZM and I just wondering if there is a option to reset all counters, id's and other tracking like a fresh install.

My best.

Re: Is there any way to reset all id's, stored files counters?

Posted: Sat Jan 28, 2023 2:21 am
by iconnor
Nope, but you could pay for someone to create it for you.

Re: Is there any way to reset all id's, stored files counters?

Posted: Sat Jan 28, 2023 11:56 am
by Toberius
I'm going to the best, free, afordable workaround: re-install whole again :wink:

Re: Is there any way to reset all id's, stored files counters?

Posted: Sat Jan 28, 2023 6:47 pm
by Toberius
Ok guys, I didn't need it to reinstall whole system, just digging a bit under 'zm' database into mariasql in my case. If you use MySQL must be the same I think.
First, I drop zm database and when logged into mysql as root, follow the insctruction below:

Code: Select all

mysql> CREATE DATABASE zm;
 * mysql> grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass';
 * mysql> flush privileges;
 * Once you completed that you should execute the following:
 * mysql -p < /usr/share/zoneminder/db/zm_create.sql
The sql sentence to run I must to ran with root because I got a lot of errors that now I don't remember.
But... still I got one error "ERROR 1728 (HY000) at line 117 in file: '/usr/share/zoneminder/db/triggers.sql': Cannot load from mysql.proc. The table is probably corrupted"

Afterall doing that I achieve reset all Id's and folder store.