Installation & MongoDB Compass
Option 1: MongoDB Atlas (Cloud) - Recommended
The easiest way to get started is using MongoDB Atlas, a fully managed cloud database.- Go to mongodb.com/atlas.
- Sign up for a free account.
- Create a free M0 Sandbox cluster.
- Create a database user (username/password).
- Allow access from your IP address (Network Access).
- Get your connection string.
Option 2: Local Installation (Community Edition)
Windows
- Download the MSI installer from the MongoDB Download Center.
- Run the installer.
- Choose “Complete” setup.
- Select “Install MongoDB as a Service”.
- Important: Check “Install MongoDB Compass” (the GUI tool).
macOS
Use Homebrew:MongoDB Compass
MongoDB Compass is the official GUI for MongoDB. It allows you to query, optimize, and analyze your MongoDB data visually.- Open MongoDB Compass.
- Paste your connection string (from Atlas or
mongodb://localhost:27017for local). - Click Connect.
Compass Features
- Data Explorer: View databases, collections, and documents.
- Query Bar: Filter documents visually.
- Aggregation Pipeline Builder: Construct complex aggregations.
- Performance: View real-time server stats.
- Shell: Built-in Mongo shell (mongosh).
Summary
- MongoDB Atlas is the cloud option (easiest).
- MongoDB Community Edition is for local development.
- MongoDB Compass is a powerful GUI tool for managing your data.