aboutsummaryrefslogtreecommitdiffstats
path: root/ransim/docker/config/db/db.sh
blob: 4f988bed726d83f698ead6f08f05689b1be25234 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/bash -xv

for db in support ransim_db
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;"