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!
Zoneminder does not accept non-default database path
Re: Zoneminder does not accept non-default database path
You should be able to set zm_db_host in your config files.
-