while puting shell variable in mysql command value does not interpolate

 port=$(ssh tms6@$x cat /tms6/scripts/start.lc.sh | grep -P '^\/tms6\/bin\/lc' | cut -d' ' -f3 | cut -b 3-6)
                 tpsip=$(ssh tms6@$x cat /tms6/scripts/start.lc.sh | grep -P '^\/tms6\/bin\/lc' | cut -d' ' -f4 | cut -b 9-)
                 # IFS="\n"
                   set -- $port
                   set -- $tpsip

                 # Converting the string to  array

                 port_arr=( $port )
                 tpsip_arr=( $tpsip )

                 port_num=${#port_arr[@]}
                 tpsip_num=${#tpsip_arr[@]}
          for (( i = 0; i <= $tpsip_num; i++ )) ### Outer for loop ###
            do
               for (( j = $i; j <= $port_num; j++ )) ### Inner for loop ###
                 do
                   # echo -n "${tpsip_arr[$i]}  ${port_arr[$j]}"

                   $MYSQL -u $MyUSER -h $MyHOST -p$MyPASS -D test -Bse 'INSERT INTO LC (server_ip, lc_used_ip, lc_used_port) VALUES ("${BOOT}", "${tpsip_arr[$i]}", "${port_arr[$j]}")'
                   break
                 done
                   echo "" #### print the new line ###
             done

variable marked in red are not interpolating as getting those value in LC table under database 'test' is exactly the same as they appear here.

Plz suggest ny workaround..........

I can't see the red color.
I guess they are probably, "${BOOT}", "${tpsip_arr[$i]}", "${port_arr[$j]}

I am not sure but I too faced that {} doesn't work in these case.
use $BOOT instead ${BOOT} and so on.. should work.
since array variable must be enclosed with in {} to get their value, you probably need to use another variables for them that can be used without {}.

for (( j = $i; j <= $port_num; j++ )) ### Inner for loop ###
                 do
                   # echo -n "${tpsip_arr[$i]}  ${port_arr[$j]}"
                   tp_sip_ar=${tpsip_arr[$i]}
                   port_ar=${port_arr[$j]}
                   $MYSQL -u $MyUSER -h $MyHOST -p$MyPASS -D test -Bse 'INSERT INTO LC (server_ip, lc_used_ip, lc_used_port) VALUES ("$BOOT", "$tp_sip_ar", "$port_ar")'
                   break

again I am not very sure about it. but please try this.