From 823f5325df405286024cdf2a985732baabc0981f Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 21 Mar 2018 22:00:26 +0100 Subject: Add Dockerfile for simple Master/Slave replication and add more parametrization --- .../share/container-scripts/mysql/galera-common.sh | 61 ---------------------- 1 file changed, 61 deletions(-) delete mode 100644 root-galera/usr/share/container-scripts/mysql/galera-common.sh (limited to 'root-galera/usr/share/container-scripts/mysql/galera-common.sh') diff --git a/root-galera/usr/share/container-scripts/mysql/galera-common.sh b/root-galera/usr/share/container-scripts/mysql/galera-common.sh deleted file mode 100644 index b4d90e5..0000000 --- a/root-galera/usr/share/container-scripts/mysql/galera-common.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -source ${CONTAINER_SCRIPTS_PATH}/common.sh - -# Initialize the MySQL database (create user accounts and the initial database) -function initialize_galera_database() { - log_info 'Initializing database ...' - if [[ "$MYSQL_VERSION" < "5.7" ]] ; then - # Using --rpm since we need mysql_install_db behaves as in RPM - log_info 'Running mysql_install_db ...' - mysql_install_db --rpm --datadir=$MYSQL_DATADIR - else - log_info "Running mysqld --initialize-insecure ..." - ${MYSQL_PREFIX}/libexec/mysqld --wsrep-on=OFF --wsrep-provider=none --initialize-insecure --datadir=$MYSQL_DATADIR --ignore-db-dir=lost+found "$@" - fi - - start_local_mysql --wsrep-on=OFF --wsrep-provider=none "$@" - - if [ -v MYSQL_RUNNING_AS_SLAVE ]; then - log_info 'Initialization finished' - return 0 - fi - - # Do not care what option is compulsory here, just create what is specified - if [ -v MYSQL_USER ]; then - log_info "Creating user specified by MYSQL_USER (${MYSQL_USER}) ..." -mysql $mysql_flags < "5.6" ]] ; then - mysql $mysql_flags <