Page 1 of 1

Zoneminder does not accept non-default database path

Posted: Sat Sep 12, 2020 7:35 pm
by mutoad
I've got a custom configuration for my database that places the database file in a directory on a different partition that does not map to the default /var/lib/mysql. The database runs fine and I can connect from the command line, but Zoneminder complains about not being able to connect using /var/lib/mysql/mysql.sock. I have correctly updated all the mariadb configuration files (/etc/my.cnf, /etc/my.cnf.d/server.cnf, and /etc/my.cnf.d/client.cnf) to point both the data directory and the socket file location to the different directory.

However, when I attempt to Zoneminder, the errors in the log file indicate that it is still trying to connect using the default path to the socket file (/var/lib/mysql/mysql.sock), so Zoneminder fails to connect. Only by putting the socket file in the default location (leaving all the other database files in the custom location), can I get zoneminder to start.

Why isn't Zoneminder using the mysql client configuration file? Is there a different config file used by Zoneminder to get the database configuration parameters?

This isn't a huge deal, but it makes my installation a little wonky.

Thanks!

Re: Zoneminder does not accept non-default database path

Posted: Sun Sep 13, 2020 6:54 am
by Magic919
You should be able to set zm_db_host in your config files.