From 3df6bf96d0fa4818e15c6d212f054303d1cb5142 Mon Sep 17 00:00:00 2001 From: Mahendra Raghuwanshi Date: Fri, 5 Apr 2019 04:56:57 +0000 Subject: SO mariadb scripts failure if user exists Issue-ID: OOM-1781 Signed-off-by: Mahendra Raghuwanshi Change-Id: Ib4b48271375cb2771771258ffee14afddcaf314c --- volumes/mariadb/docker-entrypoint-initdb.d/04-create-so-user.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'volumes/mariadb/docker-entrypoint-initdb.d/04-create-so-user.sh') 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 -- cgit 1.2.3-korg