Page 1 of 1
Upgrading to 1.19.5
Posted: Sun Sep 26, 2004 7:58 pm
by lazyleopard
I've had some trouble upgrading. I couldn't get zmupdate.pl to work. It seemed to ignore the --user=adminuser and --pass=adminpass parameters, and just complained
Code: Select all
ERROR 1044 at line 6: Access denied for user: 'webcam@localhost' to database 'zm'
Output:
Command 'mysql -hlocalhost -uwebcam -pwebcampassword zm < /usr/local/src/zm-1.19.5/db/zmalter-1.19.4.sql' exited with status: 1
I updated the database manually using
Code: Select all
# mysql zm -p --user="adminuser"
Enter password: andminpassword
mysql> \. db/zmalter-1.19.3.sql
mysql> \. db/zmalter-1.19.4.sql
mysql> \q
and, as far as I can tell, the correct stuff happened.
What hasn't happened (because zmupdate.pl is supposed to do it, and I can't get it to work) is the events directory renaming and so on...
Posted: Sun Sep 26, 2004 8:03 pm
by lazyleopard
Ok. Solved that one by commenting out the patchBD bits (because I've already done them) and now the direcory renaming's done.
Next step.
Posted: Sun Sep 26, 2004 9:53 pm
by zoneminder
I think I found a problem with that. I remember doing the same change before though so I don't know where it went but it should be ok again now.
Phil,
Posted: Thu Oct 07, 2004 8:48 pm
by Doug
I figure there are a few out there who, like me, used the ZM liveCD to get going with ZM. I wanted to post what I found when updating to v1.19.5:
FYI, updating a ZM LiveCD install from v1.19.1 to v1.19.5 requires using the "root" ID for mysql updates. When running zmupdate.pl, zm_user didn't work and zm_admin looked like it worked but if I scrolled up, I would have seen the dbase alt commands at the head of the zmaltxxxx.sql files were not executing.
I'm not sure where it went wrong but I had a whole bunch of unviewed events that can't be viewed in ZM anymore. Clicking on the events would cause the log file to show that the device name in the file path was changed to 1 or 2( only 2 cameras ) instead of their full ID name. The files are all stil in the /var/www/html/zm/events/cameraName directory but ZM can't find them. And after forcing one event on each camera, playing it, then deleting it, caused all the previous events to be erased from the camera event listing.
Posted: Thu Oct 07, 2004 9:20 pm
by zoneminder
Hi,
The update from .4 to .5 does change the event path from
/var/www/html/zm/events/cameraName
to
/var/www/html/zm/events/cameraId
though the cameraName path is left there as an alias, though nothing should be using it. It's possible that if zmupdate fell over during the database update then this part did not complete either. Then probably zmaudit came alog and hoovered up stuff fromt he DB that didn't have a corresponding event path. I'm surprised zmupdate didn't work with your root user though as that should have privileges for everything. The ZM users only have access and not structural modification privileges.
Unfortunately I don't have a machine spare that I can dedicate to the liveCD version so I can't really tell for sure what might have happened. Any other information you can provide might help track things down.
Cheers,
Phil,
Posted: Thu Oct 07, 2004 9:30 pm
by unclerichy
Just to add something else to the pot - my database is stored on a different server to ZM. ZM only has read/write access to the server via the zmuser and zmadmin mysql accounts. root access is only allowed to the mysql server on the server machine.
This meant that I had to do the update process manually - I ran the SQL on the mysql server and did some manual 'ln' commands to change the camera names to ID and create the aliases.
Not a fault of the update script by any means - just my freaky config
Posted: Thu Oct 07, 2004 10:10 pm
by Doug
zoneminder wrote:Hi,
The update from .4 to .5 does change the event path from
/var/www/html/zm/events/cameraName
to
/var/www/html/zm/events/cameraId
though the cameraName path is left there as an alias, though nothing should be using it. It's possible that if zmupdate fell over during the database update then this part did not complete either. Then probably zmaudit came alog and hoovered up stuff fromt he DB that didn't have a corresponding event path. I'm surprised zmupdate didn't work with your root user though as that should have privileges for everything. The ZM users only have access and not structural modification privileges.
Unfortunately I don't have a machine spare that I can dedicate to the liveCD version so I can't really tell for sure what might have happened. Any other information you can provide might help track things down.
Cheers,
Phil,
When I can get back to it, I'll see if I can figure out how to backup the dbase and then rebuild the v1.19.1 system to retest this. Since all the original v1.19.1 build stuff is untouched on the HD, I figure/hope backing up the dbase, starting with a fresh schema, and running "make install" from the orginal build would get me back to a fresh v1.19.1.
Then I can setup the cameras and force a few events so I can try the upgrade steps again to see if the migration faults were cockpit errors( likely ) or script/instructional errors.
Phil, when would you want this info? I'm taking the weekend off and so I wouldn't be able to get to it til next week.
Posted: Thu Oct 07, 2004 10:38 pm
by zoneminder
No rush! I've got plenty of other things to keep me busy at the moment! I'll just watch this thread and wait for you to post back if/when you get chance.
I also take the point about remote databases and will add an option to only do the non-DB parts in zmupdate in the next version.
Phil,