Altered create database db statements 46/82546/1
authorRamesh Parthasarathy <ramesh.parthasarathy@att.com>
Mon, 18 Mar 2019 00:52:00 +0000 (17:52 -0700)
committerRamesh Parthasarathy <ramesh.parthasarathy@att.com>
Mon, 18 Mar 2019 00:52:26 +0000 (17:52 -0700)
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>
volumes/mariadb/docker-entrypoint-initdb.d/01-create-camundabpmn.sh
volumes/mariadb/docker-entrypoint-initdb.d/02-create-requestdb.sh
volumes/mariadb/docker-entrypoint-initdb.d/03-create-catalogdb.sh

index 4892525..d7acfed 100644 (file)
@@ -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;
index f2231b6..dd51d80 100644 (file)
@@ -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;
index e47229c..aa47f65 100644 (file)
@@ -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;