Mongodb compass new connection
To create a new connection to a MongoDB database using MongoDB Compass, follow these steps:
- Launch MongoDB Compass: Open MongoDB Compass on your computer. You can download it from the official MongoDB website if you haven't already.
- Create a new connection: Click on the "Connect" button in the top-right corner of the MongoDB Compass window.
- Choose a connection method: You'll be presented with a few options to connect to your MongoDB database. Choose the one that best suits your needs:
- MongoDB Atlas: If you're using MongoDB Atlas, select this option and follow the prompts to connect to your Atlas cluster.
- Local MongoDB: If you have a local MongoDB instance running on your computer, select this option and enter the connection details (e.g., hostname, port, username, and password).
- MongoDB Cloud Manager: If you're using MongoDB Cloud Manager, select this option and follow the prompts to connect to your Cloud Manager cluster.
- Enter connection details: Fill in the required connection details, such as:
- Host: The hostname or IP address of your MongoDB instance.
- Port: The port number used by your MongoDB instance (default is 27017).
- Username: The username to use for authentication.
- Password: The password to use for authentication.
- Choose a database: Select the database you want to connect to from the dropdown list.
- Click "Connect": Once you've entered all the required information, click the "Connect" button to establish the connection.
- Verify the connection: MongoDB Compass will attempt to connect to your MongoDB instance. If the connection is successful, you'll see a confirmation message and the MongoDB Compass interface will load.
That's it! You should now have a new connection to your MongoDB database using MongoDB Compass.