How to recreate ZM database?

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

How to recreate ZM database?

Post by SkippyDo »

After having issues with a newer version of mariaDB (corrupted table) and now finally able to reinstall mariaDB (10.1.37), I am wanting to clear out everything from the database and recreate using backup data. There are mentions of all this but nothing comprehensive enough for me to act on: and I don't feel confident enough to apply general DB commands.

This page https://wiki.zoneminder.com/Common_Issu ... _on_Ubuntu (stuff just past the instructions to do the mysqldump) looks like something that might work to clear out everything, but I'd like to get some feedback/input before charging forward. I'm guessing that I'd then:

sudo mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
[and then]
sudo mysql < MyBackupData.sql
SkippyDo
Posts: 219
Joined: Mon Nov 20, 2017 6:49 pm

Re: How to recreate ZM database?

Post by SkippyDo »

I managed to utilize the basic info for dropping tables from the article above and then recreate using the commands I noted. Had to also remove a couple of mysql (table?) files (referenced by errors when restoring from DB backup file).

This is another reminder to do backups (at least config data)!
Post Reply