How to recreate ZM database?

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

How to recreate ZM database?

Post by SkippyDo » Wed Jan 16, 2019 2:42 am

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: 94
Joined: Mon Nov 20, 2017 6:49 pm

Re: How to recreate ZM database?

Post by SkippyDo » Thu Jan 17, 2019 12:54 am

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

Who is online

Users browsing this forum: suknil and 2 guests