OpenStack之数据库创建脚本
#!/bin/bashfor db in keystone glance nova neutron cinder swift heat
do
mysql -e "create database $db;"
mysql -e "grant all privileges on ${db}.* to '${db}'@'localhost' identified by '`echo ${db} | tr '' ''`_DBPASS';"
mysql -e "grant all privileges on ${db}.* to '${db}'@'10.1.%.%' identified by '`echo ${db} | tr '' ''`_DBPASS';"
done
页:
[1]