Mongodb compass new connection

To create a new connection to a MongoDB database using MongoDB Compass, follow these steps:

  1. Launch MongoDB Compass: Open MongoDB Compass on your computer. You can download it from the official MongoDB website if you haven't already.
  2. Create a new connection: Click on the "Connect" button in the top-right corner of the MongoDB Compass window.
  3. 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.
  4. 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.
  5. Choose a database: Select the database you want to connect to from the dropdown list.
  6. Click "Connect": Once you've entered all the required information, click the "Connect" button to establish the connection.
  7. 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.