From: yangyan Date: Fri, 28 Feb 2020 07:10:11 +0000 (+0800) Subject: Change the value of the password after obtaining encryption X-Git-Tag: 1.3.7~4 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F40%2F102540%2F3;p=vfc%2Fnfvo%2Flcm.git Change the value of the password after obtaining encryption Change-Id: Icd90a04b8bb594f91ebd3dca5517431c21d0aa77 Issue-ID: VFC-1600 Signed-off-by: yangyan --- diff --git a/docker/instance_init.sh b/docker/instance_init.sh index ed286cf9..a19e1ce8 100755 --- a/docker/instance_init.sh +++ b/docker/instance_init.sh @@ -4,9 +4,9 @@ MYSQL_IP=`echo $MYSQL_ADDR | cut -d: -f 1` MYSQL_PORT=`echo $MYSQL_ADDR | cut -d: -f 2` -if [ $MYSQL_AUTH ]; then - MYSQL_ROOT_USER=`echo $MYSQL_AUTH | cut -d: -f 1` - MYSQL_ROOT_PASSWORD=`echo $MYSQL_AUTH | cut -d: -f 2` +if [ $MYSQL_ROOT_USER ] && [ $MYSQL_ROOT_PASSWORD ]; then + MYSQL_ROOT_USER=$MYSQL_ROOT_USER + MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD else MYSQL_ROOT_USER="root" MYSQL_ROOT_PASSWORD="root"