aboutsummaryrefslogtreecommitdiffstats
path: root/docker/instance_init.sh
diff options
context:
space:
mode:
authorFu Jinhua <fu.jinhua@zte.com.cn>2017-09-05 06:26:28 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-05 06:26:28 +0000
commit14fbef4e203326c7e7d552f6d89f0dbd592e87ba (patch)
tree3edfe253fd0cd86ed4caa0129f48135c989dc83d /docker/instance_init.sh
parent446482e2f5281155600cd4ea2b6dd50b1d3ae2df (diff)
parent880272dbf48594791a2d93e74f0ffab896c49cdd (diff)
Merge "Fix docker ENTRYPOINT script"
Diffstat (limited to 'docker/instance_init.sh')
-rwxr-xr-xdocker/instance_init.sh10
1 files changed, 3 insertions, 7 deletions
diff --git a/docker/instance_init.sh b/docker/instance_init.sh
index f758a71b..f5a50547 100755
--- a/docker/instance_init.sh
+++ b/docker/instance_init.sh
@@ -10,13 +10,9 @@ function start_redis_server {
}
function start_mysql {
- su mysql -c /usr/bin/mysqld_safe &
- service mysql start
- # Wait for mysql to initialize; Set mysql root password
- for i in {1..10}; do
- sleep $i
- bash /usr/bin/mysqladmin -u root password $MYSQL_ROOT_PASSWORD &> /dev/null && break
- done
+ sed -i "s|bind-address.*|# bind-address = 127.0.0.1|" /etc/mysql/my.cnf
+ service mysql restart
+ sleep 1
}
function create_database {