[fix] Add GRANT OPTION in ynh_mysql_create_db helper

This commit is contained in:
Jérôme Lebleu 2015-12-28 18:53:15 +01:00
parent 94ce22f9d5
commit f0d0499257

View file

@ -48,7 +48,7 @@ ynh_mysql_create_db() {
if [[ $# -gt 1 ]]; then
sql+=" GRANT ALL PRIVILEGES ON ${db}.* TO '${2}'@'localhost'"
[[ -n ${3:-} ]] && sql+=" IDENTIFIED BY '${3}'"
sql+=";"
sql+=" WITH GRANT OPTION;"
fi
ynh_mysql_execute_as_root "$sql"