diff --git a/install-dsmon.sh b/install-dsmon.sh index e80eba3..c9ca111 100755 --- a/install-dsmon.sh +++ b/install-dsmon.sh @@ -162,9 +162,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_PWD="sysmoninsert" mysql -h ${mysqlip} -u sysmoninsert -e "${QRY}" + mysql -h ${mysqlip} -u sysmoninsert -psysmoninsert -e "${QRY}" QRY="USE servermonitor; SELECT id FROM hosts WHERE host='${ADD_SERVERNAME}';" - MYSQL_PWD="sysmoninsert" SET_SERVERMONID=`mysql -h ${mysqlip} -u sysmoninsert -e "${QRY}"` + SET_SERVERMONID=`mysql -h ${mysqlip} -u sysmoninsert -psysmoninsert -e "${QRY}"` else echo -e "${idsCL[Red]}Could not connect to MySQL${idsCL[Default]}" fi