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 /mysql/root-galera/usr/share/container-scripts/mysql/init/52-super.sh | |
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 'mysql/root-galera/usr/share/container-scripts/mysql/init/52-super.sh')
-rw-r--r-- | mysql/root-galera/usr/share/container-scripts/mysql/init/52-super.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql/root-galera/usr/share/container-scripts/mysql/init/52-super.sh b/mysql/root-galera/usr/share/container-scripts/mysql/init/52-super.sh new file mode 100644 index 0000000..cfa19ed --- /dev/null +++ b/mysql/root-galera/usr/share/container-scripts/mysql/init/52-super.sh @@ -0,0 +1,12 @@ +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 -a "$MYSQL_USER_PRIV_SUPER" -eq 1 ]; then + set_super +fi + +unset -f set_super |