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
zmconfig.pl -noi mysql error
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: zmconfig.pl -noi mysql error
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,
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
Solved it - it was a connection problem: "localhost" didn´t work, while "archer" as the hostname did work. All is fine now :-) Thanks anyway!