Page 1 of 1

zmupdate.pl on FC3

Posted: Wed Jan 18, 2006 2:01 pm
by vdleun
Hi,

I'm upgrading Zoneminder 1.21.4 to the new 1.22.0 version. Compiling goes ok, but can't update database. This is what I get when running zmupdate.pl: (I've scrubbed the password)

zmupdate.pl --from=1.21.4 --user=alex --pass=xxxxxxxx
DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user: 'zmuser@localhost' (Using password: YES) at /usr/lib/perl5/site_perl/5.8.5/ZoneMinder/Config.pm line 88
Can't call method "prepare_cached" on an undefined value at /usr/lib/perl5/site_perl/5.8.5/ZoneMinder/Config.pm line 90.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/ZoneMinder/Config.pm line 99.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.5/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/ZoneMinder.pm line 33.
Compilation failed in require at /usr/local/bin/zmupdate.pl line 48.
BEGIN failed--compilation aborted at /usr/local/bin/zmupdate.pl line 48.

Alexander

Posted: Wed Jan 18, 2006 2:14 pm
by zoneminder
Where are you running zmupdate from? Is zmuser the username of your zm dbuser? Finally check that the username and password etc in zm.conf is correct.

Posted: Wed Jan 18, 2006 3:15 pm
by vdleun
zm.conf was incorrect and have changed it to the correct values. It does run now:

Code: Select all

# zmupdate.pl --version=1.21.4 --user=alex --pass=xxxxxx
Update agent starting at 06/01/18 16:00:58

Initiating database upgrade to version 1.22.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 if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n

Upgrading database to version 1.22.0
ERROR 1044 at line 4: Access denied for user: 'alex@localhost' to database 'zm'
Output:
Command 'mysql -hlocalhost -ualex -pxxxxxx zm < /usr/src/ZoneMinder-1.22.0/db/zm_update-1.21.4.sql' exited with status: 1



/usr/src/ZoneMinder-1.22.0/db/zm_update-1.21.4.sql does exist.


Logging in using above command does work:

Code: Select all

# mysql -hlocalhost -ualex -pxxxxxx zm
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 75666 to server version: 3.23.58

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


zmupdate.pl runs from /usr/local/bin. Configuration is in /usr/local/etc



Greetings, Alexander

Posted: Wed Jan 18, 2006 4:58 pm
by zoneminder
I'm a bit confused why it can do some things but not others and would like to get to the bottom of it.

However for your purposes it might be easier to apply the DB changes manually (use the command that it printed out as having failed) and then changing the update sql file to be empty or just a null command so when zmupdate comes to execute it there's nothing in there to grumble about.

Posted: Wed Jan 18, 2006 6:42 pm
by vdleun
Hmm, I think I messed up... I've done updating the database using 'root' as username and now it works... I thought I set up user 'alex' with the appropiate rights but this was propably not the case.

Sorry for the noise on the forum and thanks... :)

Posted: Fri Jan 20, 2006 8:39 am
by JimNoble
I had the same problem. The normal zm db user in my setup does not have create access on the database...

Jim