zmupdate.pl on FC3

Support and queries relating to all previous versions of ZoneMinder
Locked
vdleun
Posts: 6
Joined: Mon Jan 09, 2006 11:46 am
Location: The Netherlands

zmupdate.pl on FC3

Post 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
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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.
Phil
vdleun
Posts: 6
Joined: Mon Jan 09, 2006 11:46 am
Location: The Netherlands

Post 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
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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.
Phil
vdleun
Posts: 6
Joined: Mon Jan 09, 2006 11:46 am
Location: The Netherlands

Post 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... :)
Alexander
JimNoble
Posts: 58
Joined: Thu Jul 29, 2004 12:12 am

Post by JimNoble »

I had the same problem. The normal zm db user in my setup does not have create access on the database...

Jim
Locked