kolla-ansible/docker/mariadb-app/config-mysql.sh
Chen Zhiwei 76c1fe6371 Change the default shell to bash
Unify the shell to bash in all Kolla scripts.

Change-Id: Ib9591b2f8f344eb88455c5e9b7ecf2164fb5960a
Implements: blueprint use-bash-shell
2015-04-27 13:26:37 +08:00

25 lines
895 B
Bash
Executable File

#!/bin/bash
. /opt/kolla/kolla-common.sh
: ${BIND_ADDRESS:=$PUBLIC_IP}
: ${DB_ROOT_PASSWORD:=$DB_ROOT_PASSWORD}
: ${DEFAULT_STORAGE_ENGINE:=innodb}
: ${COLLATION_SERVER:=utf8_general_ci}
: ${INIT_CONNECT:=SET NAMES utf8}
: ${CHAR_SET_SERVER:=utf8}
: ${INNODB_FILE_PER_TABLE:=true}
: ${DATADIR:=/var/lib/mysql}
: ${TEMP_FILE:='/tmp/mysql-first-time.sql'}
server_cnf=/etc/my.cnf.d/server.cnf
crudini --set $server_cnf mysqld bind-address $BIND_ADDRESS
crudini --set $server_cnf mysqld default-storage-engine $DEFAULT_STORAGE_ENGINE
crudini --set $server_cnf mysqld collation-server $COLLATION_SERVER
crudini --set $server_cnf mysqld init-connect "'${INIT_CONNECT}'"
crudini --set $server_cnf mysqld character-set-server $CHAR_SET_SERVER
if [ "${INNODB_FILE_PER_TABLE}" == "true" ] || ["${INNODB_FILE_PER_TABLE}" == "True" ] ; then
crudini --set $server_cnf mysqld innodb_file_per_table 1
fi