MongoDB 8 · Connecting and navigating

Connect to a local server

Open the shell against a database on the default port.

mongosh "mongodb://localhost:27017/mydb"

Official MongoDB 8 documentation

More connecting and navigating commands

All connecting and navigating commands · MongoDB 8 cheatsheet

Was this page helpful?