You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mysql_running () {
if [ "$remoteDB" -eq "1" ]; then
mysqladmin ping -u${ZM_DB_USER} -p${ZM_DB_PASS} -h${ZM_DB_HOST} > /dev/null 2>&1
else
mysqladmin ping > /dev/null 2>&1
fi
local result="$?"
if [ "$result" -eq "0" ]; then
echo "1" # mysql is running
else
echo "0" # mysql is not running
fi
}
According to the zm.conf ZM_DB_HOST can be ip:port - the mysql_running doesn't handle this situation correctly and mysqladmin ping fails.
should be f.ex;
mysqladmin ping -u${ZM_DB_USER} -p${ZM_DB_PASS} -h${ZM_DB_HOST} -P${ZM_DB_PORT}> /dev/null 2>&1
ZoneMinder database hostname or ip address and optionally port or unix socket
Acceptable formats include hostname[:port], ip_address[:port], or localhost:unix_socket
ZM_DB_HOST="192.168.100.16:3307"
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
mysql_running () {
if [ "$remoteDB" -eq "1" ]; then
mysqladmin ping -u${ZM_DB_USER} -p${ZM_DB_PASS} -h${ZM_DB_HOST} > /dev/null 2>&1
else
mysqladmin ping > /dev/null 2>&1
fi
local result="$?"
if [ "$result" -eq "0" ]; then
echo "1" # mysql is running
else
echo "0" # mysql is not running
fi
}
According to the zm.conf ZM_DB_HOST can be ip:port - the mysql_running doesn't handle this situation correctly and mysqladmin ping fails.
should be f.ex;
mysqladmin ping -u${ZM_DB_USER} -p${ZM_DB_PASS} -h${ZM_DB_HOST} -P${ZM_DB_PORT}> /dev/null 2>&1
ZoneMinder database hostname or ip address and optionally port or unix socket
Acceptable formats include hostname[:port], ip_address[:port], or localhost:unix_socket
ZM_DB_HOST="192.168.100.16:3307"
The text was updated successfully, but these errors were encountered: