Skip to content

Instantly share code, notes, and snippets.

@coldfire84
Last active September 22, 2018 00:40
Show Gist options
  • Save coldfire84/93ae246f145ef09da682ee3a8e297ac8 to your computer and use it in GitHub Desktop.
Save coldfire84/93ae246f145ef09da682ee3a8e297ac8 to your computer and use it in GitHub Desktop.
Node-Red-Alexa-Smart-Home-v3 MongoDB Account Setup
mongo mongodb://localhost/users --authenticationDatabase admin -u '<mongo-admin-user>' -p '<mongo-admin-password>' --eval '
db.createUser({
user: "<web-app-user>",
pwd: "<web-app-password>",
roles: [{
role: "readWrite",
db: "users"
}]
})'
mongo mongodb://localhost/sessions --authenticationDatabase admin -u '<mongo-admin-user>' -p '<mongo-admin-password>' --eval '
db.createUser({
user: "<web-app-user>",
pwd: "<web-app-password>",
roles: [{
role: "dbOwner",
db: "sessions"
}]
})'
mongo mongodb://localhost/admin --authenticationDatabase admin -u '<mongo-admin-user>' -p '<mongo-admin-password>' --eval '
db.createUser({
user: "<mqtt-user>",
pwd: "<mqtt-password>",
roles: [{
role: "read",
db: "users"
}]
})'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment