Have not been able to use ZoneMinder after what appeared to be a successful upgrade to 1.22.0
[root@localhost ZoneMinder-1.22.0]# zmupdate.pl --version=1.21.4
Update agent starting at 06/03/08 22:13:29
Initiating database upgrade to version 1.21.4
Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop :
Upgrading database to version 1.21.4
Can't find upgrade from version '1.21.4' at /usr/bin/zmupdate.pl line 536, <STDIN> line 1.
[root@localhost ZoneMinder-1.22.0]# service httpd start
Starting httpd: [ OK ]
[root@localhost ZoneMinder-1.22.0]# service zm start
Starting ZoneMinder: [ OK ]
[root@localhost ZoneMinder-1.22.0]#
When I tried to access httpd://localhost/zm I get this message
Could not connect to database: Access denied for user 'zmuser'@'localhost' (using password: YES)
tried to revert to original database via mysql < zm.dump but same message returns
Help please...Rob
Failed to access database after upgrade from 1.21.4 to 1.22.
Hi martrw
From what i can see from the messages that you have posted it seems that you have a mysql user problem.
From what i can see from the messages that you have posted it seems that you have a mysql user problem.
This tells me that the user / password is wrong, have you changed the password or username when u did the compile / install of 1.22. ??Could not connect to database: Access denied for user 'zmuser'@'localhost' (using password: YES)
Best Regards
Tom Stage
Tom Stage
Tom,
This tells me that the user / password is wrong, have you changed the password or username when u did the compile / install of 1.22. ??[/quote]
No, not intentionally. User name or password for mysql or ZoneMinder? How do I check?
Install process was:
./configure --with-webdir= /var/www/html/zm --with-cgidir= /var/www/cgi-bin
mysqldump --add-drop-table --databases zm > zm.dump
make install
zmupdate.pl --version=1.21.4
Course, nothing is ever this straigtforward for me. I know I had various mis-steps as I was going through the instructions. The zmupdate.pl did not seem to complete it's task as noted previously.
Thx... Rob
This tells me that the user / password is wrong, have you changed the password or username when u did the compile / install of 1.22. ??[/quote]
No, not intentionally. User name or password for mysql or ZoneMinder? How do I check?
Install process was:
./configure --with-webdir= /var/www/html/zm --with-cgidir= /var/www/cgi-bin
mysqldump --add-drop-table --databases zm > zm.dump
make install
zmupdate.pl --version=1.21.4
Course, nothing is ever this straigtforward for me. I know I had various mis-steps as I was going through the instructions. The zmupdate.pl did not seem to complete it's task as noted previously.
Thx... Rob
Check /etc for zm.config you need to add the correct user, password, and DB name as you had set previously.
If you don't remember what you set (the DB name is zm by default) You can add a new user to the database as detailed in the manual
Then add the user and password to /etc/zm.conf
Regards,
Corey
If you don't remember what you set (the DB name is zm by default) You can add a new user to the database as detailed in the manual
Replace <database user> and <database password> above.mysql mysql
grant select,insert,update,delete on zm.* to '<database user>'@localhost identified by '<database password>';
quit
mysqladmin reload
Then add the user and password to /etc/zm.conf
Regards,
Corey
Still not working. Checked /etc/zm.conf and the user name and password was same as previous.
# ZoneMinder config
ZM_DB_SERVER=localhost
ZM_DB_NAME=zm
ZM_DB_USER=rob
ZM_DB_PASS=password
However, I followed the users addition to the database as recommended:
[root@localhost etc]# mysql mysql
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 30 to server version: 4.1.12
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> grant select, insert, update, delete on zm.* to 'rob@localhost' identified by 'password';
Query OK, 0 rows affected (0.04 sec)
mysql> quit
Bye
[root@localhost etc]# mysqladmin reload
[root@localhost etc]#
Attempted at access http://localhost/zm/
Could not connect to database: Access denied for user 'zmuser'@'localhost' (using password: YES
Start/Stop Zoneminder:
[root@localhost etc]# service zm stop
Stopping ZoneMinder: [ OK ]
[root@localhost etc]# service httpd stop
Shutting down httpd: [ OK ]
[root@localhost etc]# service httpd start
Starting httpd: [ OK ]
s[root@localhost etc]# service zm start
Starting ZoneMinder: [ OK ]
[root@localhost etc]#
Attempted to access http://localhost/zm/
Could not connect to database: Access denied for user 'zmuser'@'localhost' (using password: YES)
# ZoneMinder config
ZM_DB_SERVER=localhost
ZM_DB_NAME=zm
ZM_DB_USER=rob
ZM_DB_PASS=password
However, I followed the users addition to the database as recommended:
[root@localhost etc]# mysql mysql
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 30 to server version: 4.1.12
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> grant select, insert, update, delete on zm.* to 'rob@localhost' identified by 'password';
Query OK, 0 rows affected (0.04 sec)
mysql> quit
Bye
[root@localhost etc]# mysqladmin reload
[root@localhost etc]#
Attempted at access http://localhost/zm/
Could not connect to database: Access denied for user 'zmuser'@'localhost' (using password: YES
Start/Stop Zoneminder:
[root@localhost etc]# service zm stop
Stopping ZoneMinder: [ OK ]
[root@localhost etc]# service httpd stop
Shutting down httpd: [ OK ]
[root@localhost etc]# service httpd start
Starting httpd: [ OK ]
s[root@localhost etc]# service zm start
Starting ZoneMinder: [ OK ]
[root@localhost etc]#
Attempted to access http://localhost/zm/
Could not connect to database: Access denied for user 'zmuser'@'localhost' (using password: YES)
Hi Rob
From the info you have provided it seems that your zm.conf have a zm user set up as rob with password = password, and the mysql error reports that the user used for the query is zmuser, so yuo have a misconfiguration somewhere.
An easy way to check the mysql database users are to install http://www.phpmyadmin.net/home_page/index.php and check what user you have granted to access the zm database.
How did you install the upgrade, by this i mean witch way did you use, rpm, or source code.
if you used the source code it might be in the generation of the zmconfig.txt that the error came to life.
One way to try and correct the error is to create a user thru the phpmysql interface, since this is quite easy, with the name : zmuser and grant the permissions for the zm database.
From the info you have provided it seems that your zm.conf have a zm user set up as rob with password = password, and the mysql error reports that the user used for the query is zmuser, so yuo have a misconfiguration somewhere.
An easy way to check the mysql database users are to install http://www.phpmyadmin.net/home_page/index.php and check what user you have granted to access the zm database.
How did you install the upgrade, by this i mean witch way did you use, rpm, or source code.
if you used the source code it might be in the generation of the zmconfig.txt that the error came to life.
One way to try and correct the error is to create a user thru the phpmysql interface, since this is quite easy, with the name : zmuser and grant the permissions for the zm database.
Best Regards
Tom Stage
Tom Stage
All:
I appreciate everyones help but nothing has worked yet. I chose to uninstall zoneminder and reinstall clean. Make uninstall failed so I exected the following commands:
rm /usr/bin/zm*
rm -r /var/www/html/zm
rm -r /var/www/cgi-bin/
mysql
>drop database zm;
>quit
I then reinstalled from the binary file and the complete history of this is a 19 page OpenOffice file. All things seemed in order. At this point I read Corey's message to use the new zm.conf file and copied the one from the ZoneMinder-1.22.0 directory to my /etc directory and changed the zmuser and pass values.
Now I am unable to start Zoneminder. The following message is where I am now stuck:
[root@localhost Desktop]# service httpd start
[root@localhost Desktop]# service zm start
In /etc/zm.conf there should not be null values.
[root@localhost Desktop]# zmpkg.pl start
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 .7/ZoneMinder/Config.pm line 88
Can't call method "prepare_cached" on an undefined value at /usr/lib/perl5/site_ perl/5.8.7/ZoneMinder/Config.pm line 90.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder/C onfig.pm line 99.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder.pm li ne 33.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder.p m line 33.
Compilation failed in require at /usr/local/bin/zmpkg.pl line 45.
BEGIN failed--compilation aborted at /usr/local/bin/zmpkg.pl line 45.
[root@localhost Desktop]#
Below is zm.conf:
# ==========================================================================
#
# ZoneMinder Base Configuration, $Date: 2005/12/16 10:12:40 $, $Revision: 1.1 $
#
# ==========================================================================
#
# This file is generated by 'configure'. Care should be taken if manually
# editing this file as an changes may be overwritten by subsequent configuration
# or installations.
#
# Current version of ZoneMinder
ZM_VERSION=1.22.0
# Path to build directory, used mostly for finding DB upgrade scripts
ZM_PATH_BUILD=/home/rob/ZoneMinder-1.22.0
# Build time, used to record when to trigger various checks
ZM_TIME_BUILD=1142203981
# Path to ZoneMinder binaries
ZM_PATH_BIN=/usr/local/bin
# Path to ZoneMinder libraries (none at present, for future use)
ZM_PATH_LIB=/usr/local/lib
# Path to ZoneMinder configuration (this file only at present)
ZM_PATH_CONF=/usr/local/etc
# Path to ZoneMinder web files
ZM_PATH_WEB=/var/www/html/zm
# Path to ZoneMinder cgi files
ZM_PATH_CGI=/var/www/cgi-bin
# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=apache
ZM_WEB_GROUP=apache
# ZoneMinder database hostname or ip address
ZM_DB_HOST=localhost
# ZoneMinder database name
ZM_DB_NAME=zm
# ZoneMinder database user
ZM_DB_USER=rob
# ZoneMinder database password
ZM_DB_PASS=password
I appreciate everyones help but nothing has worked yet. I chose to uninstall zoneminder and reinstall clean. Make uninstall failed so I exected the following commands:
rm /usr/bin/zm*
rm -r /var/www/html/zm
rm -r /var/www/cgi-bin/
mysql
>drop database zm;
>quit
I then reinstalled from the binary file and the complete history of this is a 19 page OpenOffice file. All things seemed in order. At this point I read Corey's message to use the new zm.conf file and copied the one from the ZoneMinder-1.22.0 directory to my /etc directory and changed the zmuser and pass values.
Now I am unable to start Zoneminder. The following message is where I am now stuck:
[root@localhost Desktop]# service httpd start
[root@localhost Desktop]# service zm start
In /etc/zm.conf there should not be null values.
[root@localhost Desktop]# zmpkg.pl start
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 .7/ZoneMinder/Config.pm line 88
Can't call method "prepare_cached" on an undefined value at /usr/lib/perl5/site_ perl/5.8.7/ZoneMinder/Config.pm line 90.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder/C onfig.pm line 99.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder.pm li ne 33.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder.p m line 33.
Compilation failed in require at /usr/local/bin/zmpkg.pl line 45.
BEGIN failed--compilation aborted at /usr/local/bin/zmpkg.pl line 45.
[root@localhost Desktop]#
Below is zm.conf:
# ==========================================================================
#
# ZoneMinder Base Configuration, $Date: 2005/12/16 10:12:40 $, $Revision: 1.1 $
#
# ==========================================================================
#
# This file is generated by 'configure'. Care should be taken if manually
# editing this file as an changes may be overwritten by subsequent configuration
# or installations.
#
# Current version of ZoneMinder
ZM_VERSION=1.22.0
# Path to build directory, used mostly for finding DB upgrade scripts
ZM_PATH_BUILD=/home/rob/ZoneMinder-1.22.0
# Build time, used to record when to trigger various checks
ZM_TIME_BUILD=1142203981
# Path to ZoneMinder binaries
ZM_PATH_BIN=/usr/local/bin
# Path to ZoneMinder libraries (none at present, for future use)
ZM_PATH_LIB=/usr/local/lib
# Path to ZoneMinder configuration (this file only at present)
ZM_PATH_CONF=/usr/local/etc
# Path to ZoneMinder web files
ZM_PATH_WEB=/var/www/html/zm
# Path to ZoneMinder cgi files
ZM_PATH_CGI=/var/www/cgi-bin
# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=apache
ZM_WEB_GROUP=apache
# ZoneMinder database hostname or ip address
ZM_DB_HOST=localhost
# ZoneMinder database name
ZM_DB_NAME=zm
# ZoneMinder database user
ZM_DB_USER=rob
# ZoneMinder database password
ZM_DB_PASS=password