📌 Purpose & Quick Summary

Modern web applications, real-time APIs, and microservices often utilize document-oriented NoSQL databases. The MongoDB Databases hub in BoostonCP allows you to provision NoSQL databases with dedicated user authentication, obtaining clean connection URIs on Port 27017 for seamless integration into Node.js (Mongoose), Python (PyMongo), or Go backends.

BoostonCP MongoDB Databases Overview

Figure 11: MongoDB NoSQL database hub showing active databases, port 27017 status, and connection URIs.


🖥️ Interface Tour & Elements

  1. MongoDB Service Status Banner: Displays listener status on Port 27017.
  2. Create Database Modal: Configuration dialog to define database name, user credentials, and authentication mechanism.
  3. Database Ledger: Table listing provisioned NoSQL databases, storage metrics, and action controls.
  4. Copy URI Utility: 1-click clipboard copy for connection strings with authentication source parameters.

🛠️ Step-by-Step Instructions

Step 1: Provisioning a MongoDB Database

  1. In the sidebar, click MongoDB DBs (icon: fa-leaf).
  2. Click Create MongoDB Database.
  3. Enter the database name and user credentials.
  4. Click Create Database. The MongoDB daemon initializes the database and creates user credentials with readWrite roles.

Step 2: Connecting Your Application

  1. In the database ledger, click Copy Connection String.
  2. The URI is generated in standard format: mongodb://username:[email protected]:27017/dbname?authSource=admin
  3. Add this URI to your Node.js .env file as MONGO_URI.

⚙️ Complete Field & Parameter Reference Table

Connection Parameter Standard Value Description
Host 127.0.0.1 Local host connection preventing external port exposure.
Port 27017 Standard MongoDB daemon listener port.
Auth Source admin Default authentication database where user roles are verified.
Protocol mongodb:// Standard NoSQL connection scheme.

❓ Troubleshooting & Common Errors

1. Connection Error: "Authentication failed"

  • Cause: Missing ?authSource=admin parameter in the connection string.
  • Solution: Always append ?authSource=admin to ensure MongoDB authenticates the user against the correct auth collection.