Upgrade from 1.28 on centos 7 fails with DB upgrade errors

Forum for questions and support relating to the 1.29.x releases only.
Post Reply
lpallard
Posts: 85
Joined: Fri Mar 05, 2010 10:59 pm

Upgrade from 1.28 on centos 7 fails with DB upgrade errors

Post by lpallard » Sat Mar 19, 2016 7:42 pm

Hello,

I had ZM 1.28 running well on a centos 7 VPS, but I decided to perform a system wide yum update and of course zoneminder was upgraded to 1.29.

After the system upgrade I rebooted the server and found ZM's webpage issueing the following error:

[code]SQL-ERR 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'zm.Servers' doesn't exist', statement was 'SELECT * FROM Servers ORDER BY Name'[/code]

Then I realized that I had forgot to run the DB upgrade with

[code]sudo zmupdate.pl[/code]

Running this command issues the following errors:

[code][root@vps ~]# sudo zmupdate.pl

Initiating database upgrade to version 1.29.0 from version 1.28.1

Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop :

Do you wish to take a backup of your database prior to upgrading?
This may result in a large file in /var/lib/zoneminder/temp if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n

Upgrading database to version 1.29.0
Loading config from DB
Saving config to DB
Upgrading DB to 1.28.99 from 1.28.1
sh: -c: line 0: syntax error near unexpected token `)'
sh: -c: line 0: `mysql -hcentos-database -uzoneminder -p4Dd,7lr|s0oEZ)]J zm < /usr/share/zoneminder/db/zm_update-1.28.99.sql'
Output:
Command 'mysql -hcentos-database -uzoneminder -p4Dd,7lr|s0oEZ)]J zm < /usr/share/zoneminder/db/zm_update-1.28.99.sql' exited with status: 1[/code]

What do I do? Apparently there's something wrong with the perl script?

bbunge
Posts: 2708
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Upgrade from 1.28 on centos 7 fails with DB upgrade errors

Post by bbunge » Sun Mar 20, 2016 2:07 am

Did you update the database permissions before upgrading the database?

lpallard
Posts: 85
Joined: Fri Mar 05, 2010 10:59 pm

Re: Upgrade from 1.28 on centos 7 fails with DB upgrade errors

Post by lpallard » Sun Mar 20, 2016 5:53 pm

Good catch. I blindly assumed the permissions were OK since I had duplicated the real database in Mysql for testing purposes without making sure the step 2 of the install section was met.

Now with the perms all set up I could run the perl update script.

Just for my own curiosity, what has changed between 1.28 and 1.29 at the database level?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests