Page 1 of 1

zmconfig.pl -noi mysql error

Posted: Tue Nov 18, 2003 1:37 pm
by bowman
Hi,

I specified the appropriate mySQL host, db name, user and password during the interactive run of zmconfig.pl, now if I run it using perl zmconfig.pl -noi I get:

Loading config from 'zmconfig.txt'
Loading config from DB
DBI connect('database=zm;host=localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at zmconfig.pl line 1300
Error: unable to load options from database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Saving config to 'zmconfig.txt'
Saving config to DB
DBI connect('database=zm;host=localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at zmconfig.pl line 1205
Error: unable to save options to database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

If I go ahead manually by issuing "/opt/mysql/bin/mysql -h localhost -u root -p*censored*", I don´t have trouble connecting to mysql.

Any ideas what the problem could be? DBI and dbd-mysql modules are installed.

Thanks,
bowman

Re: zmconfig.pl -noi mysql error

Posted: Tue Nov 18, 2003 2:19 pm
by zoneminder
Hi,

It might be a bit obvious but did you actually create the ZM database after running zmconfig.pl for the first time? It substitutes the value you give for DB name into zmschema.sql but you have to pipe this into mysql (mysql < zmschema.sql) to actually create the DB.

I thought I'd mention it because in your manual command example you don't actually give a DB name so you're not specifying a DB to connect to.

Cheers,

Phil,

Re: zmconfig.pl -noi mysql error

Posted: Tue Nov 18, 2003 2:37 pm
by bowman
Solved it - it was a connection problem: "localhost" didn´t work, while "archer" as the hostname did work. All is fine now :-) Thanks anyway!