zmpkg.pl start gives me some trouble.

Forum for questions and support relating to the 1.24.x releases only.
Locked
Reckon
Posts: 1
Joined: Tue May 18, 2010 10:22 am

zmpkg.pl start gives me some trouble.

Post by Reckon »

Hi,
I am racking my head over this issue for the last 2 days. Issue is simple and i know it but the solution i guess is far from reach...

My Issue:

I have configured my ZoneMinder Ver 1.24.2 in a Fedora 8 laptop. I have successfully done make, make install...

As the next step, when i try to start Zmpkg.pl, i get the following error.

DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/lib/perl5/site_perl/5.12.0/ZoneMinder/Config.pm line 89
Can't call method "prepare_cached" on an undefined value at /usr/local/lib/perl5/site_perl/5.12.0/ZoneMinder/Config.pm line 91.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.12.0/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.12.0/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.12.0/ZoneMinder.pm line 33.
Compilation failed in require at /usr/local/bin/zmpkg.pl line 47.
BEGIN failed--compilation aborted at /usr/local/bin/zmpkg.pl line 47.

The thing is i dont have a file called mysql.sock in /var/lib/mysql/mysql.sock. Instead its present in /opt/lampp/var/mysql file. How will i alter the perl file to point it to this location? or has it got anything to do with altering the perl file?

Any help from any friend is greatly appreciated.

Regards,
Reckon.
Paranoid
Posts: 129
Joined: Thu Feb 05, 2009 10:40 pm

Re: zmpkg.pl start gives me some trouble.

Post by Paranoid »

Reckon wrote:Hi,
I am racking my head over this issue for the last 2 days. Issue is simple and i know it but the solution i guess is far from reach...

My Issue:

I have configured my ZoneMinder Ver 1.24.2 in a Fedora 8 laptop. I have successfully done make, make install...

As the next step, when i try to start Zmpkg.pl, i get the following error.

DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/lib/perl5/site_perl/5.12.0/ZoneMinder/Config.pm line 89
Can't call method "prepare_cached" on an undefined value at /usr/local/lib/perl5/site_perl/5.12.0/ZoneMinder/Config.pm line 91.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.12.0/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.12.0/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.12.0/ZoneMinder.pm line 33.
Compilation failed in require at /usr/local/bin/zmpkg.pl line 47.
BEGIN failed--compilation aborted at /usr/local/bin/zmpkg.pl line 47.

The thing is i dont have a file called mysql.sock in /var/lib/mysql/mysql.sock. Instead its present in /opt/lampp/var/mysql file. How will i alter the perl file to point it to this location? or has it got anything to do with altering the perl file?

Any help from any friend is greatly appreciated.

Regards,
Reckon.
I assume you have mysql installed and running?

Have a look in the mysql config file. On my system (SuSE) its located in /etc/my.cnf

You should see something similar to the following:

Code: Select all

[client]
port            = 3306
socket          = /var/run/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port            = 3306
bind-address = 192.168.31.5
socket         = /var/run/mysql/mysql.sock
There will probably be other config items in there, but note the "socket" option. This tells the mysql server where to put the socket for local connections and tells clients (eg. zoneminder) where to look for the socket. The values for both the client and server should be the same.
Locked