diff options
author | Ramesh Parthasarathy <ramesh.parthasarathy@att.com> | 2019-03-17 17:52:00 -0700 |
---|---|---|
committer | Ramesh Parthasarathy <ramesh.parthasarathy@att.com> | 2019-03-17 17:52:26 -0700 |
commit | 758b2c4b6202078961d665a1ab9db5e72e341516 (patch) | |
tree | 317b33b183ba0e8de8481c0fb4ee139dc9e6b359 | |
parent | 56dd0f52a5212d09b1b024c448f744b748d44a83 (diff) |
Altered create database db statements
Create user seems to fail every time
So added drop user statement to overcome
Change-Id: Ie50085771d38759c5b7792515ac2f199a5d6530e
Issue-ID: SO-1674
Signed-off-by: Ramesh Parthasarathy(rp6768)<ramesh.parthasarathy@att.com>
3 files changed, 3 insertions, 0 deletions
diff --git a/volumes/mariadb/docker-entrypoint-initdb.d/01-create-camundabpmn.sh b/volumes/mariadb/docker-entrypoint-initdb.d/01-create-camundabpmn.sh index 4892525..d7acfed 100644 --- a/volumes/mariadb/docker-entrypoint-initdb.d/01-create-camundabpmn.sh +++ b/volumes/mariadb/docker-entrypoint-initdb.d/01-create-camundabpmn.sh @@ -27,6 +27,7 @@ mysql -uroot -p$MYSQL_ROOT_PASSWORD << 'EOF' || exit 1 DROP DATABASE IF EXISTS `camundabpmn`; CREATE DATABASE `camundabpmn`; DELETE FROM mysql.user WHERE User='camundauser'; +DROP USER 'camundauser'; CREATE USER 'camundauser'; GRANT ALL on camundabpmn.* to 'camundauser' identified by 'camunda123' with GRANT OPTION; FLUSH PRIVILEGES; diff --git a/volumes/mariadb/docker-entrypoint-initdb.d/02-create-requestdb.sh b/volumes/mariadb/docker-entrypoint-initdb.d/02-create-requestdb.sh index f2231b6..dd51d80 100644 --- a/volumes/mariadb/docker-entrypoint-initdb.d/02-create-requestdb.sh +++ b/volumes/mariadb/docker-entrypoint-initdb.d/02-create-requestdb.sh @@ -27,6 +27,7 @@ mysql -uroot -p$MYSQL_ROOT_PASSWORD << 'EOF' || exit 1 DROP DATABASE IF EXISTS `requestdb`; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `requestdb` /*!40100 DEFAULT CHARACTER SET latin1 */; DELETE FROM mysql.user WHERE User='requestuser'; +DROP USER 'requestuser'; CREATE USER 'requestuser'; GRANT ALL on requestdb.* to 'requestuser' identified by 'request123' with GRANT OPTION; FLUSH PRIVILEGES; diff --git a/volumes/mariadb/docker-entrypoint-initdb.d/03-create-catalogdb.sh b/volumes/mariadb/docker-entrypoint-initdb.d/03-create-catalogdb.sh index e47229c..aa47f65 100644 --- a/volumes/mariadb/docker-entrypoint-initdb.d/03-create-catalogdb.sh +++ b/volumes/mariadb/docker-entrypoint-initdb.d/03-create-catalogdb.sh @@ -27,6 +27,7 @@ mysql -uroot -p$MYSQL_ROOT_PASSWORD << 'EOF' || exit 1 DROP DATABASE IF EXISTS `catalogdb`; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `catalogdb` /*!40100 DEFAULT CHARACTER SET latin1 */; DELETE FROM mysql.user WHERE User='cataloguser'; +DROP USER 'cataloguser'; CREATE USER 'cataloguser'; GRANT ALL on catalogdb.* to 'cataloguser' identified by 'catalog123' with GRANT OPTION; FLUSH PRIVILEGES; |