Set MYSQL_HOST parameter to better support multi-node mode.
When deploying openstack with multi-node mode, mysql needs to be started by listening it's real ip, not localhost. but devstack always use localhost to recreate databases that will lead bellow errors. Fix bug 1177735 Change-Id: I50284f469a998d023a41b4796f1dc775bb52e710
This commit is contained in:
parent
b240ad472b
commit
2832f28012
@ -36,8 +36,8 @@ function cleanup_database_mysql {
|
||||
function recreate_database_mysql {
|
||||
local db=$1
|
||||
local charset=$2
|
||||
mysql -u$DATABASE_USER -p$DATABASE_PASSWORD -e "DROP DATABASE IF EXISTS $db;"
|
||||
mysql -u$DATABASE_USER -p$DATABASE_PASSWORD -e "CREATE DATABASE $db CHARACTER SET $charset;"
|
||||
mysql -u$DATABASE_USER -p$DATABASE_PASSWORD -h$MYSQL_HOST -e "DROP DATABASE IF EXISTS $db;"
|
||||
mysql -u$DATABASE_USER -p$DATABASE_PASSWORD -h$MYSQL_HOST -e "CREATE DATABASE $db CHARACTER SET $charset;"
|
||||
}
|
||||
|
||||
function configure_database_mysql {
|
||||
|
Loading…
Reference in New Issue
Block a user