SO mariadb scripts failure if user exists
[so/docker-config.git] / volumes / mariadb / docker-entrypoint-initdb.d / 01-create-camundabpmn.sh
index fdec4c3..b6d30e4 100644 (file)
@@ -26,7 +26,7 @@ echo "Creating camundabpmn database . . ." 1>/tmp/mariadb-camundabpmn.log 2>&1
 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 IF EXISTS 'camundauser';
 CREATE USER 'camundauser';
 GRANT ALL on camundabpmn.* to 'camundauser' identified by 'camunda123' with GRANT OPTION;
 FLUSH PRIVILEGES;