Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. export DB ={{your_value_here}}
  2. export MONGO_HOST ={{your_value_here}}
  3. export MONGO_PORT ={{your_value_here}}
  4. export ADMIN_USER ={{your_value_here}}
  5. export ADMIN_PASSWORD ={{your_value_here}}
  6. export USER ={{your_value_here}}
  7. export USER_PASSWORD ={{your_value_here}}
  8.  
  9. mongo $DB --host $MONGO_HOST --port $MONGO_PORT -u $ADMIN_USER -p $ADMIN_PASSWORD --authenticationDatabase admin --eval \
  10. "db.createUser({user: '$USER',pwd: '$USER_PASSWORD', roles: [ { role: 'dbOwner', db: '$DB' } ]});"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement