Yeah, yeah; I know... the machine is an emergency backup for a machine running a primary app that requires ABI; I can't go any newer than 2.4.
That said, the RedHat init script isn't working all that well for me, though I'm not sure it's the script's fault:
It's bombing on
$ sudo -u wwwrun /usr/local/bin/zmdc.pl check
which replies:
DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) at /usr/lib/perl5/site_perl/5.8.1/ZoneMinder/Config.pm line 89
Can't call method "prepare_cached" on an undefined value at /usr/lib/perl5/site_perl/5.8.1/ZoneMinder/Config.pm line 91.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.1/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.1/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.1/ZoneMinder.pm line 33.
Compilation failed in require at /usr/local/bin/zmdc.pl line 50.
BEGIN failed--compilation aborted at /usr/local/bin/zmdc.pl line 50.
I can connect to the DB manually as root, but -u zmuser fails, even though
mysql> show grants for zmuser;
+------------------------------------------------------------------------------+
| Grants for zmuser@% |
+------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'zmuser'@'%' IDENTIFIED BY PASSWORD '751dd8070bb7d20a' |
| GRANT SELECT, INSERT, UPDATE, DELETE ON `zm`.* TO 'zmuser'@'%' |
+------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
Is there something obvious I've done wrong?
My zm.conf is:
# ==========================================================================
#
# ZoneMinder Base Configuration, $Date: 2006/04/23 20:24:13 $, $Revision: 1.2 $
#
# ==========================================================================
#
# 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.1
# Path to build directory, used mostly for finding DB upgrade scripts
ZM_PATH_BUILD=/appl/ZoneMinder-1.22.1
ZM_PATH_UPDATE=/appl/ZoneMinder-1.22.1/db
# Build time, used to record when to trigger various checks
ZM_TIME_BUILD=1148489060
# 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=/appl/apache/htdocs
# Path to ZoneMinder cgi files
ZM_PATH_CGI=/appl/apache/cgi-bin
# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=wwwrun
ZM_WEB_GROUP=www
# ZoneMinder database hostname or ip address
ZM_DB_HOST=localhost
# ZoneMinder database name
ZM_DB_NAME=zm
# ZoneMinder database user
ZM_DB_USER=zmuser
# ZoneMinder database password
ZM_DB_PASS=what_that_password_should_be
This is only my second zm install; it's been about a year.
Startup problem 1.22.1 on SuSE 9.0
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
It's possible that your mysqld and your php-mysql disagree on where to look for mysql.sock. See if you can find it, perhaps even in /tmp. Then the easiest solution is just to symlink it to where things are looking. Ultimately though you ought to educate one or the other to actually check the correct location.
Phil
Aha!
It doesn't actually say, in the error message, that the reason it can't connect is because it's talking to a missing or disconnected socket *named /var/blah/blah".
And I know that SuSE is bad about this; *just tonight* I was helping someone set up WebGUI who was having the same problem.
Too close to the forest to see the trees, I guess.
Thanks, Phil.
And I know that SuSE is bad about this; *just tonight* I was helping someone set up WebGUI who was having the same problem.
Too close to the forest to see the trees, I guess.
Thanks, Phil.
It's worse than that
he'd dead, Jim.
The problem is that I didn't have php-mysql installed at all.
Oops.
One suggestion on this topic, and I can't remember which project I'm stealing the idea from:
They have targets in their makefile called testdeps and fixdeps, which do what you might expect. Testdeps just tells you, so you can install the dependencies in your preferred fashion, while fixdeps just gets them fixed, in case you don't care.
I loved this, since the sequential dependency chase is the least fun part of building and installing componentized software.
I think it's RT that has this ... [looks] ... yep.
The problem is that I didn't have php-mysql installed at all.
Oops.
One suggestion on this topic, and I can't remember which project I'm stealing the idea from:
They have targets in their makefile called testdeps and fixdeps, which do what you might expect. Testdeps just tells you, so you can install the dependencies in your preferred fashion, while fixdeps just gets them fixed, in case you don't care.
I loved this, since the sequential dependency chase is the least fun part of building and installing componentized software.
I think it's RT that has this ... [looks] ... yep.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
I'll have to look at how RT does it. The nice thing about theirs is that it just checks everything; configure tends to only check *when it gets to something*, having done a random amount of time-consuming work *first*.
It's much less wearing, in my experience, to get all the dependencies resolved first, in one step.
My problem, as it happens, turned out to be that the permissions on /var/lib/mysql were too tight (700), and weren't letting wwwrun get to the socket. I loosened them to 755, and it's started now.
It's much less wearing, in my experience, to get all the dependencies resolved first, in one step.
My problem, as it happens, turned out to be that the permissions on /var/lib/mysql were too tight (700), and weren't letting wwwrun get to the socket. I loosened them to 755, and it's started now.