diff options
-rwxr-xr-x | docker/instance_init.sh | 6 |
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" |