First, the code that attempts to extract the current version from the database was getting the wrong impression. My database is at version 1.22.0 but ZM_DYN_DB_VERSION said 1.21.4. I fixed that by going into mysql thus:
Code: Select all
# mysql -u webcam -p zm
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 49 to server version: 4.1.20-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> update Config set Value='1.22.0' where Name='ZM_DYN_DB_VERSION';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
mysql> quit
Bye
Code: Select all
Upgrade ZoneMinder database:
Update agent starting at 06/07/05 22:53:36
Initiating database upgrade to version 1.22.2
Upgrading database to version 1.22.2
ERROR 1044 (42000) at line 8: Access denied for user 'webcam'@'localhost' to database 'zm'
Output:
Command 'mysql -hlocalhost -uwebcam -pwatcher zm < /etc/zm/db/zm_update-1.22.0.sql' exited with status: 1
Or should zmupdate use root instead?