aboutsummaryrefslogtreecommitdiffstats
path: root/volumes/mariadb/docker-entrypoint-initdb.d/04-create-so-user.sh
diff options
context:
space:
mode:
authorMahendra Raghuwanshi <mahendra.raghuwanshi@amdocs.com>2019-04-05 04:56:57 +0000
committerMahendra Raghuwanshi <mahendra.raghuwanshi@amdocs.com>2019-04-05 05:01:06 +0000
commit3df6bf96d0fa4818e15c6d212f054303d1cb5142 (patch)
treee659f3cedf3d445763b37e34cb50b0303887239a /volumes/mariadb/docker-entrypoint-initdb.d/04-create-so-user.sh
parentc00b3784cca0906cee656a5cda821488ffc0ddad (diff)
SO mariadb scripts failure if user exists
Issue-ID: OOM-1781 Signed-off-by: Mahendra Raghuwanshi <mahendra.raghuwanshi@amdocs.com> Change-Id: Ib4b48271375cb2771771258ffee14afddcaf314c
Diffstat (limited to 'volumes/mariadb/docker-entrypoint-initdb.d/04-create-so-user.sh')
-rw-r--r--volumes/mariadb/docker-entrypoint-initdb.d/04-create-so-user.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/volumes/mariadb/docker-entrypoint-initdb.d/04-create-so-user.sh b/volumes/mariadb/docker-entrypoint-initdb.d/04-create-so-user.sh
index 307d553..9c96720 100644
--- a/volumes/mariadb/docker-entrypoint-initdb.d/04-create-so-user.sh
+++ b/volumes/mariadb/docker-entrypoint-initdb.d/04-create-so-user.sh
@@ -24,7 +24,7 @@
echo "Creating so user . . ." 1>/tmp/mariadb-so-user.log 2>&1
mysql -uroot -p$MYSQL_ROOT_PASSWORD << 'EOF' || exit 1
-DELETE FROM mysql.user WHERE User='so_user';
+DROP USER IF EXISTS 'so_user';
CREATE USER 'so_user';
GRANT USAGE ON *.* TO 'so_user'@'%' IDENTIFIED BY 'so_User123';
GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON `requestdb`.* TO 'so_user'@'%';
@@ -33,4 +33,4 @@ GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON `camundabpmn`.* TO '
FLUSH PRIVILEGES;
EOF
-echo "Created so user . . ." 1>>/tmp/mariadb-so-user.log 2>&1 \ No newline at end of file
+echo "Created so user . . ." 1>>/tmp/mariadb-so-user.log 2>&1