diff options
Diffstat (limited to 'config/db/db.sh')
-rw-r--r-- | config/db/db.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config/db/db.sh b/config/db/db.sh new file mode 100644 index 00000000..0de1deb1 --- /dev/null +++ b/config/db/db.sh @@ -0,0 +1,9 @@ +#!/bin/bash -xv + +for db in support onap_sdk log +do + mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};" + mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;" +done + +mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;" |