hpc-cloud/roles/keystone/scripts/initialize_db.sh

8 lines
387 B
Bash
Raw Normal View History

#!/bin/bash
# Start a mariadb container to use its mysql client to initialize the keystone database.
2017-07-03 11:54:47 +02:00
docker run --rm -i mariadb:10.1.22 mysql -uroot -pgeheim --host "$1" << EOF
CREATE DATABASE IF NOT EXISTS keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'keystone';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone';
EOF