mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Add GRANT OPTION in ynh_mysql_create_db helper
This commit is contained in:
parent
94ce22f9d5
commit
f0d0499257
1 changed files with 2 additions and 2 deletions
|
@ -46,9 +46,9 @@ ynh_mysql_create_db() {
|
|||
|
||||
# grant all privilegies to user
|
||||
if [[ $# -gt 1 ]]; then
|
||||
sql+="GRANT ALL PRIVILEGES ON ${db}.* TO '${2}'@'localhost'"
|
||||
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"
|
||||
|
|
Loading…
Add table
Reference in a new issue