1.26.4 zmupdate.pl failed to update 'Monitors' table

Forum for questions and support relating to the 1.26.x releases only.
Locked
BlankMan
Posts: 147
Joined: Tue Jan 19, 2010 2:53 am
Location: Milwaukee, WI USA

1.26.4 zmupdate.pl failed to update 'Monitors' table

Post by BlankMan »

Code: Select all

# zmupdate.pl 

Initiating database upgrade to version 1.26.4 from version 1.25.0

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 /tmp/zm if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n

Upgrading database to version 1.26.4
Loading config from DB
No option 'ZM_LOCAL_BGR_INVERT' found, removing at /usr/lib/perl5/site_perl/5.16.0/ZoneMinder/ConfigAdmin.pm line 89, <STDIN> line 2.
No option 'ZM_Y_IMAGE_DELTAS' found, removing at /usr/lib/perl5/site_perl/5.16.0/ZoneMinder/ConfigAdmin.pm line 89, <STDIN> line 2.
No option 'ZM_V4L2_CAPTURE_FIELDS' found, removing at /usr/lib/perl5/site_perl/5.16.0/ZoneMinder/ConfigAdmin.pm line 89, <STDIN> line 2.
Saving config to DB
DBD::mysql::db do failed: ALTER command denied to user 'zmuser'@'localhost' for table 'Monitors' at /usr/local/bin/zmupdate.pl line 1010, <STDIN> line 2.
DBD::mysql::db do failed: ALTER command denied to user 'zmuser'@'localhost' for table 'Monitors' at /usr/local/bin/zmupdate.pl line 1013, <STDIN> line 2.

Previous versions of ZoneMinder used the MyISAM database engine.
However, the recommended database engine is InnoDB.

Hint: InnoDB tables are much less likely to be corrupted during an unclean shutdown.

Press 'y' to convert your tables to InnoDB or 'n' to skip : n
Upgrading DB to 1.26.1 from 1.26.0

Database successfully upgraded from version 1.26.1.
Upgrading DB to 1.26.2 from 1.26.0

Database successfully upgraded from version 1.26.2.
Upgrading DB to 1.26.3 from 1.26.0

Database successfully upgraded from version 1.26.3.

Database upgrade to version 1.26.4 successful.

Of course then it wouldn't start so had to do it manually as 'root'.

Code: Select all

ALTER TABLE `Monitors` ADD `Colours` TINYINT UNSIGNED NOT NULL DEFAULT '1' AFTER `Height`;
ALTER TABLE `Monitors` ADD `Deinterlacing` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `Orientation`;
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: 1.26.4 zmupdate.pl failed to update 'Monitors' table

Post by Magic919 »

As you can see from the docs, they say to run this command as a more privileged user -

http://www.zoneminder.com/wiki/index.ph ... #Upgrading

The next step in an upgrade is to run the zmupdate.pl script to make any changes to the database or file system required by the new version. Ordinarily you can run this from your ZoneMinder build directory by doing

zmupdate.pl --version=<from version> [--user=<database user> --pass=<database password>]

where ‘from version’ relates to the version of ZM you are upgrading from, 1.21.1 for example, and not the version you are upgrading to. All updates from that version onwards will be applied; however zmupdate.pl will only work with upgrades from 1.19.0 onwards. The ‘user’ and ‘pass’ options allow you to specify a database user and password with sufficient privilege to ‘alter’ the structure of the database. **This is not necessarily the database user you use for ZoneMinder. **
-
BlankMan
Posts: 147
Joined: Tue Jan 19, 2010 2:53 am
Location: Milwaukee, WI USA

Re: 1.26.4 zmupdate.pl failed to update 'Monitors' table

Post by BlankMan »

Interesting. Never had to do that before and all the previous MySQL updates worked. If they wouldn't have I wouldn't have a 'Logs' table and then things probably wouldn't have worked at all anyways... Now I know.
Locked