Skip to content

MongoDB

Architecture schema

MongoDB architecture

Mongo ~> Databases ~> Collections ~> Items

Open a cli

Bash
mongo # Default port
mongo --port # Custom port

List items

Text Only
show users
show roles
show profile
show databases
show collections

Select a database

Text Only
use <database>

Request all items from a collection

Text Only
db.<collection>.find()

Sources