diff --git a/lib/databases/mysql b/lib/databases/mysql index f6cc9224af..89ae082c81 100644 --- a/lib/databases/mysql +++ b/lib/databases/mysql @@ -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';"