Skip to content

Instantly share code, notes, and snippets.

@aravindgv
Created February 20, 2014 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aravindgv/9109881 to your computer and use it in GitHub Desktop.
Save aravindgv/9109881 to your computer and use it in GitHub Desktop.
mongod how to login and run some basic commands
root@jb-dev ~# mongo MongoDB shell version: 2.4.8
connecting to: test
use admin
switched to db admin
db.auth(‘jeeto’,‘xxxx’)
1
show dbs
show collections
system.indexes
system.users
db.getCollectionNames()
[ “context”, “system.indexes”, “user_progress”, “user_sessions” ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment