Page 1 of 1

Database Upgrade Error 1.28.107 to 1.28.109

Posted: Mon Nov 16, 2015 10:48 pm
by bbunge
I got an error when I ran /usr/bin/zmupdate.pl to upgrade my database.

Ubuntu 14.04-3 64 bit system

Upgrading database to version 1.28.109
Loading config from DB
Saving config to DB
DBD::mysql::db do failed: Access denied for user 'zmuser'@'localhost' to database 'zm' at /usr/share/perl5/ZoneMinder/ConfigAdmin.pm line 135, <STDIN> line 2.
Can't lock Config table: Access denied for user 'zmuser'@'localhost' to database 'zm' at /usr/bin/zmupdate.pl line 498.
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle database=zm;host=localhost at /usr/share/perl/5.18/Carp.pm line 100, <STDIN> line 2.

I got around the error by dropping the zm database and installing a fresh copy

Re: Database Upgrade Error 1.28.107 to 1.28.109

Posted: Mon Nov 16, 2015 11:11 pm
by DVB Hardware
I did too today, I think I went to phpmyadmin and the privileges were reduced for zmuser, so I edited it and applied all.

I also had a version mismatch error so I installed again uping .108 to .109. so after I fixed zmuser I ran zmupdate.pl

The best I can remember

Jimmy

Re: Database Upgrade Error 1.28.107 to 1.28.109

Posted: Tue Nov 17, 2015 1:27 am
by knight-of-ni
Can't lock Config table: Access denied for user 'zmuser'@'localhost' to database 'zm' at /usr/bin/zmupdate.pl line 498.
So either the Config table was open by some other process (did you stop zoneminder?)
or your zmuser account does not have mysql "lock" permission assigned to it.

Re: Database Upgrade Error 1.28.107 to 1.28.109

Posted: Tue Nov 17, 2015 2:47 am
by bbunge
zm was stopped

lack of "lock" likely it

Should input?

mysql -e "grant select,insert,update,delete,create,lock on zm.* to 'zmuser'@localhost identified by 'zmpass';"


Will try again tomorrow.

Re: Database Upgrade Error 1.28.107 to 1.28.109

Posted: Tue Nov 17, 2015 12:57 pm
by rockedge
I got an error when I ran /usr/bin/zmupdate.pl to upgrade my database.
I ran into the same errors with the fix by ending up dropping the database and creating new. Upgrade 1.28.108 > 1.28.109

Re: Database Upgrade Error 1.28.107 to 1.28.109

Posted: Tue Nov 17, 2015 2:21 pm
by bbunge
Upgrade worked the second time. MySQL permissions should be:

mysql -e "grant select,insert,update,delete,create,alter,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';"

Upgrade procedures at:

https://wiki.zoneminder.com/Common_Issu ... _on_Ubuntu

Re: Database Upgrade Error 1.28.107 to 1.28.109

Posted: Tue Nov 17, 2015 6:31 pm
by knight-of-ni
Bill,
As of 1.28.109, you need to add "index" to the set of mysql permissions.

Re: Database Upgrade Error 1.28.107 to 1.28.109

Posted: Tue Nov 17, 2015 7:54 pm
by bbunge
Will go back and try it again.....

bb

Re: Database Upgrade Error 1.28.107 to 1.28.109

Posted: Tue Nov 17, 2015 11:22 pm
by bbunge
2nd test upgrade. I needed the lock tables and alter to get the database upgrade to work. So, with index added the command is:

mysql -e "grant select,insert,update,delete,create,alter,lock tables,index on zm.* to 'zmuser'@localhost identified by 'zmpass';"