Try to set initial mysql root password also on Ubuntu
On Ubuntu nodes, devstack tries to predefine the initial mysql root password by doing some debconf-set-selections, but these will not take effect if the corresponding package has been installed earlier. So just try to set it every time, like we do on other distros. Change-Id: I2c167051fc5e53dd0ccf82a60ab085cd9cdea28d
This commit is contained in:
parent
6b8a115b95
commit
9abb26d696
@ -82,10 +82,9 @@ function configure_database_mysql {
|
||||
fi
|
||||
|
||||
# Set the root password - only works the first time. For Ubuntu, we already
|
||||
# did that with debconf before installing the package.
|
||||
if ! is_ubuntu; then
|
||||
# did that with debconf before installing the package, but we still try,
|
||||
# because the package might have been installed already.
|
||||
sudo mysqladmin -u root password $DATABASE_PASSWORD || true
|
||||
fi
|
||||
|
||||
# Update the DB to give user '$DATABASE_USER'@'%' full control of the all databases:
|
||||
sudo mysql -uroot -p$DATABASE_PASSWORD -h127.0.0.1 -e "GRANT ALL PRIVILEGES ON *.* TO '$DATABASE_USER'@'%' identified by '$DATABASE_PASSWORD';"
|
||||
|
Loading…
Reference in New Issue
Block a user