Connect to a MongoDB Process (2024)

On this page

  • Overview
  • Firewall Rules
  • Procedures

Cloud Manager will no longer support Automation, Backup, and Monitoring for MongoDB 3.6 and 4.0 after August 30th, 2024. Please

upgrade your MongoDB deployment or migrate to Atlas.

Overview

To connect to a MongoDB, retrieve the hostname and port informationfrom Cloud Manager and then use a MongoDB client, such as mongosh or aMongoDB driver, to connect. Toconnect to a cluster, retrieve the hostnameand port for the mongos process. To connect to areplica set or standalone process, retrievethe hostname and port for the mongod processes.

Firewall Rules

Firewall rules and user authentication affect your access to MongoDB.You must have access to the server and port of the MongoDB process.For information on firewalls on servers running MongoDB, seethe firewall information in the Network Security document in the MongoDB manual.

If your MongoDB instance runs on Amazon Web Services (AWS), then thesecurity group associated with the AWS servers also affects access. AWSsecurity groups control inbound and outbound traffic to theirassociated servers.

Procedures

You can retrieve a shell command for connecting to your MongoDBinstance, or you can retrieve the host and port number of a specificMongoDB process and create your own command for connecting using eithershell orMongoDB driver.

Get a Shell Command to Connect to a MongoDB Instance

In MongoDB Cloud Manager, go to the Deployment page for your project.

  1. If it is not already displayed, select the organization thatcontains your desired project from the Organizations menu in thenavigation bar.

  2. If it's not already displayed, select your desired projectfrom the Projects menu in the navigation bar.

  3. If the Deployment page is notalready displayed, click Deployment in the sidebar.

    The Deployment pagedisplays.

2

Go to the Processes page.

Click the Processes tab for your deployment.

The Processes pagedisplays.

3

Select the Clusters view for your deployment.

4

On the line listing the cluster, replica set, or process, click the ellipsis icon and select Connect to this instance.

Cloud Manager provides a mongo command that you can useto connect to the MongoDB process.

Get the Host and Port for a MongoDB Process

In MongoDB Cloud Manager, go to the Deployment page for your project.

  1. If it is not already displayed, select the organization thatcontains your desired project from the Organizations menu in thenavigation bar.

  2. If it's not already displayed, select your desired projectfrom the Projects menu in the navigation bar.

  3. If the Deployment page is notalready displayed, click Deployment in the sidebar.

    The Deployment pagedisplays.

2

Go to the Processes page.

Click the Processes tab for your deployment.

The Processes pagedisplays.

3

Select the Clusters view for your deployment.

4

(Optional) For sharded clusters, filter which process type is listed.

The four buttons are listed in the following order, left to right:Shards, Configs, Mongos, andBIs.

Process

Displays

Shards

mongod processes that host your data.

Configs

mongod processes that run as configservers to store a sharded cluster's metadata.

Mongos

mongos processes that route data in a shardedcluster.

BIs

BI processes that access datain a sharded cluster.

5

On the line listing the process, click Metrics.

Cloud Manager displays the hostname and port of the process at the top of thecharts page.

Connect to a Deployment Using mongosh

Get the host and port using the previous procedure. From a shell, run mongosh and specify thehost and port. For example:

mongosh --username <user> --password <pass> --host <host> --port <port>

Connect to a Deployment Using a MongoDB Driver

Get the host and port using the above procedure.See your driver's instructions forcreating a connection string thatspecifies the hostname and port.

For sharded clusters, you specify the hostname and port of themongos instance. For a replica set, you specify a seed list ofall hosts in the replica set. Your driver will automatically connect tothe primary. For example:

mongodb://[<username>:<password>@]hostname0<:port>[,hostname1:<port1>][,hostname2:<port2>][...][,hostnameN:<portN>]

Connect to a MongoDB Process (2024)
Top Articles
Health Uses for Hydrogen Peroxide
Change or remove the payment cards that you use with Apple Pay - Apple Support
Devotion Showtimes Near Xscape Theatres Blankenbaker 16
Main Moon Ilion Menu
Air Canada bullish about its prospects as recovery gains steam
Lichtsignale | Spur H0 | Sortiment | Viessmann Modelltechnik GmbH
My Vidant Chart
Edgar And Herschel Trivia Questions
Oriellys St James Mn
Helloid Worthington Login
Pwc Transparency Report
Labor Gigs On Craigslist
Otterbrook Goldens
Po Box 35691 Canton Oh
Jalapeno Grill Ponca City Menu
Curry Ford Accident Today
Barber Gym Quantico Hours
Universal Stone Llc - Slab Warehouse & Fabrication
St Clair County Mi Mugshots
Menus - Sea Level Oyster Bar - NBPT
Jayah And Kimora Phone Number
Amelia Chase Bank Murder
6892697335
A Christmas Horse - Alison Senxation
Mobile crane from the Netherlands, used mobile crane for sale from the Netherlands
Craigslist Sf Garage Sales
49S Results Coral
WOODSTOCK CELEBRATES 50 YEARS WITH COMPREHENSIVE 38-CD DELUXE BOXED SET | Rhino
Hoofdletters voor God in de NBV21 - Bijbelblog
Egg Crutch Glove Envelope
Royal Caribbean Luggage Tags Pending
The Pretty Kitty Tanglewood
Joe's Truck Accessories Summerville South Carolina
Best Restaurants In Blacksburg
How are you feeling? Vocabulary & expressions to answer this common question!
Uc Santa Cruz Events
How to play Yahoo Fantasy Football | Yahoo Help - SLN24152
Atlanta Musicians Craigslist
Qlima© Petroleumofen Elektronischer Laserofen SRE 9046 TC mit 4,7 KW CO2 Wächter • EUR 425,95
R/Moissanite
Hireright Applicant Center Login
Gabrielle Abbate Obituary
News & Events | Pi Recordings
Dancing Bear - House Party! ID ? Brunette in hardcore action
Iron Drop Cafe
Ewwwww Gif
Greg Steube Height
Frank 26 Forum
Lsreg Att
Leslie's Pool Supply Redding California
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 6333

Rating: 4.9 / 5 (69 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.