Upgrade from 1.28 on centos 7 fails with DB upgrade errors
Posted: 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?
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?