summaryrefslogtreecommitdiffstats
path: root/config/db/db.sh
blob: 0de1deb12365d082a390553de1382a755ee315da (plain)
1
2
3
4
5
6
7
8
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;"