mongodb/mongodb-connect

Connect to MongoDB

Connect to a MongoDB server

mongodb
connect
cli

Command

mongo --host localhost --port 27017

Explanation

Connects to a MongoDB server. Useful as the starting point for any database operations.

Examples

Connect to local MongoDB instance with default port

mongo