Creating mongodb database

This commit is contained in:
Bob Mottram 2017-11-23 18:09:18 +00:00
parent 9b1a368c77
commit 3e7ab9a472
1 changed files with 1 additions and 1 deletions

View File

@ -152,5 +152,5 @@ function create_database_mongodb {
app_name="$1"
app_admin_password="$2"
app_admin_username=$3
mongo admin --eval "db.createUser({user: '$app_admin_username', pwd: '$app_admin_password', roles: [ { role: 'dbOwner', db: '$app_name' } ] })"
mongo admin --eval "db.createUser({user: '$app_admin_username', pwd: '$app_admin_password', roles: [ { role: 'userAdminAnyDatabase', db: 'admin' } ] })"
}