X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fso%2Fcomponents%2Fso-mariadb%2Fresources%2Fconfig%2Fdocker-entrypoint-initdb.d%2F98-create-so-user.sh;h=bf8ae781c0017687bf742db1cd7adbe1946d8795;hb=refs%2Fheads%2Fmaster;hp=05b1ff70cfb91cdf890e944dea63e2baccf4558e;hpb=6e80ecd2a6aeacf645f73f06d70d7947fc0f97d2;p=oom.git diff --git a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/98-create-so-user.sh b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/98-create-so-user.sh index 05b1ff70cf..bf8ae781c0 100755 --- a/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/98-create-so-user.sh +++ b/kubernetes/so/components/so-mariadb/resources/config/docker-entrypoint-initdb.d/98-create-so-user.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 user . . ." 1>/tmp/mariadb-so-user.log 2>&1 prepare_password() { - echo "$1" | sed -e "s/'/\\\\'/g; s/\"/\\\\\"/g" + echo "$1" | sed -e "s/'/\\\\'/g; s/\"/\\\\\"/g" } DB_PASSWORD=`prepare_password $DB_PASSWORD` @@ -38,6 +41,7 @@ GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON requestdb.* TO '${DB GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON catalogdb.* TO '${DB_USER}'@'%'; GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON camundabpmn.* TO '${DB_USER}'@'%'; GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON nfvo.* TO '${DB_USER}'@'%'; +GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON cnfm.* TO '${DB_USER}'@'%'; FLUSH PRIVILEGES; EOF