From charlesreid1

Connecting

To figure out what's in a mongodb database, start by figuring out where mong is running and how to connect to it:

ps aux | grep mongo

This will show the currently-running mongo process and the command used to start it, which will tell you what port mongo is listening on. Suppose it's running on port 12121. Then we can connect to the mongo db this way:

mongo --port 12121

This will give us a shell prompt for the mongo db shell.

Exploring

Start by figuring out what databases there are. Run the listDatabases command this way:

> db.adminCommand({listDatabases: 1})