Zoneminder does not accept non-default database path

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
mutoad
Posts: 3
Joined: Sat Sep 12, 2020 6:57 pm

Zoneminder does not accept non-default database path

Post 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!
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Zoneminder does not accept non-default database path

Post by Magic919 »

You should be able to set zm_db_host in your config files.
-
Post Reply