Merge "Try to set initial mysql root password also on Ubuntu"

This commit is contained in:
Jenkins
2016-12-11 15:50:21 +00:00
committed by Gerrit Code Review

View File

@@ -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
sudo mysqladmin -u root password $DATABASE_PASSWORD || true
fi
# 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
# 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';"