diff --git a/install-dsmon.sh b/install-dsmon.sh index 928e129..f0c799f 100755 --- a/install-dsmon.sh +++ b/install-dsmon.sh @@ -159,9 +159,9 @@ if [ "${SET_SERVERMONID}" = "new" ]; then if [ "${mysqlip}" != "" ]; then QRY="USE servermonitor; INSERT INTO hosts (\`host\`,\`hostname\`,\`ip\`,\`limits\`) VALUES ('${ADD_SERVERNAME}','${ADD_SERVERHOSTNAME}','${SERVERIPS// /}','${thresholdlog[@]}');" - mysql -h ${mysqlip} --user=sysmoninsert --password=sysmoninsert -e "${QRY}" + MYSQL_PWD="sysmoninsert" mysql -h ${mysqlip} -u sysmoninsert -e "${QRY}" QRY="USE servermonitor; SELECT id FROM hosts WHERE host='${ADD_SERVERNAME}';" - SET_SERVERMONID=`mysql -h ${mysqlip} --user=sysmoninsert --password=sysmoninsert -e "${QRY}"` + MYSQL_PWD="sysmoninsert" SET_SERVERMONID=`mysql -h ${mysqlip} -u sysmoninsert -e "${QRY}"` else echo -e "${idsCL[Red]}Could not connect to MySQL${idsCL[Default]}" fi