Warning, overriding installed ./zm.conf file with local copy
Update agent starting at 06/05/01 00:27:05
Initiating database upgrade to version 1.22.1
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 : y
Creating backup to zm-1.22.0.dump. This may take several minutes.
mysqldump: Got error: 1044: Access denied for user 'zm_user'@'localhost' to database 'zm' when using LOCK TABLES
Output:
Command 'mysqldump -hlocalhost -uzm_user -pzm_pass --add-drop-table --databases zm > zm-1.22.0.dump' exited with status: 2
I've tried every combination I can think of, like:
I'm pretty sure that I just used the default user and password. In /usr/local/etc/zm.conf, I have the following:
---------------------
# ZoneMinder database user
ZM_DB_USER=zmuser
# ZoneMinder database password
ZM_DB_PASS=zmpass
---------------------
I don't think I changed it to anything. Everything works ok in the old version. I'm assuming that if those weren't the correct username/passwords, I'd be having problems. Is there any way to verify the correct username or to crack the password? Or am I missing something here?
Yes. The ordinary ZM user has no privileges usually for modifying tables. Therefore for updates you need to use your systems privileged user, often the db root user.
I'm able to get into mysql with no errors when I run "mysql zm -u zmuser -p" and use zmpass for the password. (Obviously, I'm not really concerned about security here...) But, I'm still not clear on how to run zmupdate.pl. I don't recall ever setting up mysql with a db administrator password or anything similar. I tried the command with my root username and password, but that doesn't work. Any ideas?
if it doesn't work, you can start mysql without any authentication, and set the root password afterwards. you have to use the "--skip-grant-tables" option.
I have exactly the same problem. zmupdate ignores what I set for user and password:
[root@rascal ZoneMinder-1.22.1]# /usr/local/bin/zmupdate.pl -version=zm-1.21.3 --user=zm --pass=zm
Warning, overriding installed ./zm.conf file with local copy
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.3/ZoneMinder/Config.pm line 89
Note that I specifyied user=zm but it tired to get into the db as 'zmuser'.
I even edited /usr/local/etc/zm.conf to change ZM_DB_USER=zm and it still uses zmuser.
I also edited zmupdate.pl to set db_user='zm' and it has no effect.
I am not a perl hacker so I don't have clue how to debug this, but I really think the error is coming from something it is doing before it reads the parameters.
Of course as soon as I sent the last email, I thought about what I wrote. It turns out that if you run it from the build directory there is a zm.conf there which gets read by the Config module. I change that to have my proper user and password and things work.
It seems that the flags to zmupdate.pl don't override what is used in the Config.pm module. This seems like a bug.
The zmupdate script only uses the supplied user and password for modifying the DB. It will still use the ordinarily configured one for loading config etc. So if your local zm.conf has incorrect details in it this will fail.
with synaptic chose "mark for complete removal" zoneminder then apply, then install again in the command line or synaptic and for me GOAL!!, maybe is because the "complete removal" erase the database.