diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2018-03-21 22:00:26 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2018-03-21 22:00:26 +0100 |
commit | 823f5325df405286024cdf2a985732baabc0981f (patch) | |
tree | 3274e3e970c6ddbbedc97cdaeb55a060a7f6d310 /root-galera/usr/share/container-scripts/mysql/init | |
parent | 9d9925ec86bb779c60655bbf487d7921f22a36eb (diff) | |
download | mysql-galera-823f5325df405286024cdf2a985732baabc0981f.tar.gz mysql-galera-823f5325df405286024cdf2a985732baabc0981f.tar.bz2 mysql-galera-823f5325df405286024cdf2a985732baabc0981f.tar.xz mysql-galera-823f5325df405286024cdf2a985732baabc0981f.zip |
Add Dockerfile for simple Master/Slave replication and add more parametrization
Diffstat (limited to 'root-galera/usr/share/container-scripts/mysql/init')
4 files changed, 0 insertions, 66 deletions
diff --git a/root-galera/usr/share/container-scripts/mysql/init/50-galera-passwd-change.sh b/root-galera/usr/share/container-scripts/mysql/init/50-galera-passwd-change.sh deleted file mode 100644 index 2844d5f..0000000 --- a/root-galera/usr/share/container-scripts/mysql/init/50-galera-passwd-change.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -password_change() { -mysql $mysql_flags <<EOSQL - CREATE USER IF NOT EXISTS '${MYSQL_GALERA_USER}'@'localhost'; - SET PASSWORD FOR '${MYSQL_GALERA_USER}'@'localhost' = PASSWORD('${MYSQL_GALERA_PASSWORD}'); - GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO '${MYSQL_GALERA_USER}'@'localhost'; - UPDATE mysql.user SET Super_Priv='Y', Process_priv='Y' WHERE user='${MYSQL_GALERA_USER}' AND host='localhost'; - FLUSH PRIVILEGES; -EOSQL -} - -password_change -unset -f password_change diff --git a/root-galera/usr/share/container-scripts/mysql/init/51-extradb.sh b/root-galera/usr/share/container-scripts/mysql/init/51-extradb.sh deleted file mode 100644 index c047265..0000000 --- a/root-galera/usr/share/container-scripts/mysql/init/51-extradb.sh +++ /dev/null @@ -1,14 +0,0 @@ -extradb() { -for db in "$MYSQL_EXTRADB"; do -mysql $mysql_flags <<EOSQL - GRANT ALL ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ; - FLUSH PRIVILEGES ; -EOSQL -done; -} - -if [ -v MYSQL_EXTRADB ]; then - extradb -fi - -unset -f extradb diff --git a/root-galera/usr/share/container-scripts/mysql/init/52-super.sh b/root-galera/usr/share/container-scripts/mysql/init/52-super.sh deleted file mode 100644 index 9e49151..0000000 --- a/root-galera/usr/share/container-scripts/mysql/init/52-super.sh +++ /dev/null @@ -1,12 +0,0 @@ -set_super() { -mysql $mysql_flags <<EOSQL - UPDATE mysql.user SET Super_Priv='Y' WHERE user='${MYSQL_USER}' AND host='%'; - FLUSH PRIVILEGES; -EOSQL -} - -if [ -v MYSQL_USER_PRIV_SUPER ]; then - set_super -fi - -unset -f set_super diff --git a/root-galera/usr/share/container-scripts/mysql/init/53-pma.sh b/root-galera/usr/share/container-scripts/mysql/init/53-pma.sh deleted file mode 100644 index 5644b8f..0000000 --- a/root-galera/usr/share/container-scripts/mysql/init/53-pma.sh +++ /dev/null @@ -1,26 +0,0 @@ -set_pma() { -mysql $mysql_flags <<EOSQL - CREATE USER IF NOT EXISTS 'pma'@'%' IDENTIFIED BY '${MYSQL_PMA_PASSWORD}'; - ALTER USER 'pma'@'%' IDENTIFIED BY '${MYSQL_PMA_PASSWORD}'; - - GRANT USAGE ON mysql.* TO 'pma'@'%'; - GRANT SELECT ( - Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, - Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, - File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, - Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, - Execute_priv, Repl_slave_priv, Repl_client_priv - ) ON mysql.user TO 'pma'@'%'; - - GRANT SELECT ON mysql.db TO 'pma'@'%'; - #GRANT SELECT ON mysql.host TO 'pma'@'%'; - GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) ON mysql.tables_priv TO 'pma'@'%'; - GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 'pma'@'%'; -EOSQL -} - -if [ -v MYSQL_PMA_PASSWORD ]; then - set_pma -fi - -unset -f set_pma |