Mysql non standard port
Mysql non standard port
I need to run two mysql programs in one computer and I'd like to ask, if is it possible to tell zoneminder, that mysql database is using different port insteand of standard port 3306.
Re: Mysql non standard port
Not sure if this will work but you could try putting the port number after the host name in zm.conf so you would have something like
ZM_DB_HOST=localhost:3305
ZM_DB_HOST=localhost:3305
Re: Mysql non standard port
It does not work for me this way. I stopped zm and mysqld, chaneged in my.cnf port = 3307, started mysqld, changed in zm.conf ZM_DB_HOST=localhost:3307, started zm and got FAILED. Log file says:
Sep 5 10:47:22 skladr zmpkg[8871]: INF [Command: start]
Sep 5 10:47:22 skladr zmfix[8883]: ERR [Can't connect to server: Unknown MySQL server host 'localhost:3307' (3)]
Sep 5 10:47:22 skladr zmpkg[8871]: ERR [Unable to run "sudo -u apache /usr/bin/zmfix", output is ""]
With the standard mysql port 3306 everything works OK.
I added PORT statement after HOST statement in zm.conf:
ZM_DB_HOST=localhost
ZM_DB_PORT=3307
started zm. got OK and it worked!
Better include this info in the doc file, changing MySQL default port is a useful option.
Sep 5 10:47:22 skladr zmpkg[8871]: INF [Command: start]
Sep 5 10:47:22 skladr zmfix[8883]: ERR [Can't connect to server: Unknown MySQL server host 'localhost:3307' (3)]
Sep 5 10:47:22 skladr zmpkg[8871]: ERR [Unable to run "sudo -u apache /usr/bin/zmfix", output is ""]
With the standard mysql port 3306 everything works OK.
I added PORT statement after HOST statement in zm.conf:
ZM_DB_HOST=localhost
ZM_DB_PORT=3307
started zm. got OK and it worked!
Better include this info in the doc file, changing MySQL default port is a useful option.