|
...
|
...
|
@@ -82,10 +82,9 @@ function configure_database_mysql {
|
|
82
|
82
|
fi
|
|
83
|
83
|
|
|
84
|
84
|
# Set the root password - only works the first time. For Ubuntu, we already
|
|
85
|
|
- # did that with debconf before installing the package.
|
|
86
|
|
- if ! is_ubuntu; then
|
|
87
|
|
- sudo mysqladmin -u root password $DATABASE_PASSWORD || true
|
|
88
|
|
- fi
|
|
|
85
|
+ # did that with debconf before installing the package, but we still try,
|
|
|
86
|
+ # because the package might have been installed already.
|
|
|
87
|
+ sudo mysqladmin -u root password $DATABASE_PASSWORD || true
|
|
89
|
88
|
|
|
90
|
89
|
# Update the DB to give user '$DATABASE_USER'@'%' full control of the all databases:
|
|
91
|
90
|
sudo mysql -uroot -p$DATABASE_PASSWORD -h127.0.0.1 -e "GRANT ALL PRIVILEGES ON *.* TO '$DATABASE_USER'@'%' identified by '$DATABASE_PASSWORD';"
|