X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fso%2Fcomponents%2Fso-mariadb%2Fresources%2Fconfig%2Fdocker-entrypoint-initdb.d%2F99-create-so-admin.sh;h=74b869cd54dfced3cd9e89813f017e1e5860093c;hb=refs%2Fheads%2Fmaster;hp=593739e1cf3649a18bf2445c76ddd49ad196e1f0;hpb=378813a42e27b1bc7a5e469641b7e4c47ffad43e;p=oom.git diff --git a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/99-create-so-admin.sh b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/99-create-so-admin.sh index 593739e1cf..74b869cd54 100755 --- a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/99-create-so-admin.sh +++ b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/99-create-so-admin.sh @@ -1,8 +1,10 @@ #!/bin/sh +{{/* # # ============LICENSE_START========================================== # =================================================================== # Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# Modifications Copyright (C) 2022/23 Nordix Foundation # =================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,12 +22,13 @@ # ECOMP and OpenECOMP are trademarks # and service marks of AT&T Intellectual Property. # +*/}} echo "Creating so admin user . . ." 1>/tmp/mariadb-so-admin.log 2>&1 prepare_password() { - echo "$1" | sed -e "s/'/\\\\'/g; s/\"/\\\\\"/g" + echo "$1" | sed -e "s/'/\\\\'/g; s/\"/\\\\\"/g" } DB_ADMIN_PASSWORD=`prepare_password $DB_ADMIN_PASSWORD` @@ -38,6 +41,7 @@ GRANT ALL PRIVILEGES ON camundabpmn.* TO '${DB_ADMIN}'@'%' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON requestdb.* TO '${DB_ADMIN}'@'%' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON catalogdb.* TO '${DB_ADMIN}'@'%' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON nfvo.* TO '${DB_ADMIN}'@'%' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON cnfm.* TO '${DB_ADMIN}'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES; EOF