aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2020-02-28 15:10:11 +0800
committerYan Yang <yangyanyj@chinamobile.com>2020-02-28 08:43:09 +0000
commit770c740feb64e7ccc52f47ac26c7ae102c0b3263 (patch)
tree6ee7509e1ebd51586001ba4b6274c166ed8cea6b
parent5e30dfe5a80c93e7c10ade7de6cca103b20d5d9d (diff)
Change the value of the password after obtaining encryption
Change-Id: Icd90a04b8bb594f91ebd3dca5517431c21d0aa77 Issue-ID: VFC-1600 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
-rwxr-xr-xdocker/instance_init.sh6
1 files changed, 3 insertions, 3 deletions
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"