Page 1 of 1

error when running the command perl ./zmconfig.pl

Posted: Tue Apr 13, 2004 10:02 pm
by linh
[root@redhat9 zm-1.19.1]# perl ./zmconfig.pl
Loading config from DB
DBI connect('database=zm;host=localhost','',...) failed: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2) at ./zmconfig.pl line 1476
Warning: unable to load options from database. Ignore if database not created yet

IT ASKED A BUNCH OF QUESTIONS. I WILL NOT LISTED HERE.

Saving config to 'zmconfig.txt'
Saving config to DB

ERROR MESSAGE IS HERE
DBI connect('database=zm;host=localhost','admin',...) failed: Can't connect to local MySQL server through socket '/v
ar/lib/mysql/mysql.sock' (2) at ./zmconfig.pl line 1380
Warning: unable to save options to database. Ignore if database not created yet

Generating 'src/zm_config_defines.h'
Processing 'src/zm_config.h'
Processing 'web/zm_config.php'
Processing 'scripts/zmdc.pl'
Processing 'scripts/zmwatch.pl'
Processing 'scripts/zmaudit.pl'
Processing 'scripts/zmfilter.pl'
Processing 'scripts/zmx10.pl'
Processing 'scripts/zmpkg.pl'
Processing 'scripts/zmupdate.pl'
Processing 'scripts/zmvideo.pl'
Processing 'scripts/zm'
Processing 'db/zmschema.sql'
Now please create your database and database users and then run
'perl zmconfig.pl -noi' to import your configuration into the database
[root@redhat9 zm-1.19.1]# rpm -qa | grep php

==========================================

Posted: Wed Apr 14, 2004 7:20 am
by zoneminder
Does the file '/var/lib/mysql/mysql.sock' exist on your system?

If not it may be that either MySQL is not running or that it has created it's .sock file elsewhere, often in /tmp. If it is elsewhere you can usually symlink it to where the mysql libraries want it though you may have to repeat this on each boot. You will have to check the MySQL site or docs for more informaiton on a permanent fix.

Phil,