Skip to content

Commit 98725c1

Browse files
authored
Merge pull request #277201 from ShawnJackson/mongodb-vcore-how-to-connect
[AQ] edit pass: Azure Cosmos DB for MongoDB vCore how-to-connect articles
2 parents c2aa261 + 28bfd95 commit 98725c1

File tree

2 files changed

+65
-65
lines changed

2 files changed

+65
-65
lines changed

articles/cosmos-db/mongodb/vcore/how-to-connect-mongo-shell.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
11
---
2-
title: Use Mongo Shell to connect
3-
titleSuffix: Azure Cosmos DB for MongoDB vCore
4-
description: Connect to an Azure Cosmos DB for MongoDB vCore account using Mongo Shell community tool to query data.
2+
title: Use MongoDB Shell to connect
3+
titleSuffix: Azure Cosmos DB for MongoDB in vCore architecture
4+
description: Connect to an Azure Cosmos DB for MongoDB (vCore architecture) account by using the MongoDB Shell community tool to query data.
55
author: kruti-m
66
ms.author: krmeht
77
ms.reviewer: yongl
88
ms.service: cosmos-db
99
ms.subservice: mongodb-vcore
1010
ms.topic: how-to
1111
ms.date: 02/05/2024
12-
# CustomerIntent: As a database owner, I want to use Mongo Shell to connect and query my database & collections.
12+
# customer intent: As a database owner, I want to use Mongo Shell to connect to and query my database and collections.
1313
---
1414

15-
# Use MongoDB Shell (Mongosh) to connect to Azure Cosmos DB for MongoDB vCore
15+
# Use MongoDB Shell to connect to Azure Cosmos DB for MongoDB (vCore)
1616

1717
[!INCLUDE[MongoDB vCore](~/reusable-content/ce-skilling/azure/includes/cosmos-db/includes/appliesto-mongodb-vcore.md)]
1818

19-
MongoDB Shell (Mongosh), is a JavaScript and Node.js environment for interacting with MongoDB deployments. It's a popular community tool to test queries and interact with the data in your Azure Cosmos DB for MongoDB database.
19+
MongoDB Shell (`mongosh`) is a JavaScript and Node.js environment for interacting with MongoDB deployments. It's a popular community tool to test queries and interact with the data in your Azure Cosmos DB for MongoDB database.
2020

2121
## Prerequisites
22-
Here are some prerequisites.
23-
- An existing Azure Cosmos DB for MongoDB vCore cluster.
24-
- An installed version of the MongoShell from the community site.
25-
- Ensure you're setting up the necessary environment variables post installation for your operating system
26-
- Ensure the firewall settings to allow the machine to connect. Follow the guidelines for [configuring the firewall for Azure Cosmos DB](../../../cosmos-db/how-to-configure-firewall.md)
27-
- You can choose to allow requests from your current IP, requests from cloud services or requests from virtual machines - specific IP Ranges
28-
29-
![Illustration that shows Firewall Settings update for MongoDB Vcore.](media/how-to-connect-mongo-shell/firewall-settings.gif)
3022

31-
If you accidentally open all the ports, you're warned before saving the changes.
23+
- An existing Azure Cosmos DB for MongoDB (vCore architecture) cluster.
24+
- An installed version of MongoDB Shell from the community site.
25+
- Setup of the necessary post-installation environment variables for your operating system.
26+
- Firewall settings that allow the machine to connect. Follow the guidelines for [configuring the firewall for Azure Cosmos DB](../../../cosmos-db/how-to-configure-firewall.md).
27+
28+
You can choose to allow requests from your current IP address, requests from cloud services, or requests from virtual machines (specific IP ranges).
3229

33-
## Connect using Mongo Shell (Mongosh)
30+
![Animation that shows an update of firewall settings for Azure Cosmos DB for MongoDB in the vCore architecture.](media/how-to-connect-mongo-shell/firewall-settings.gif)
3431

35-
To add your Azure Cosmos DB cluster to Mongo shell, perform the following steps:
36-
1. Retrieve the connection information for your Azure Cosmos DB for MongoDB vCore using the instructions [here](quickstart-portal.md#get-cluster-credentials).
32+
If you accidentally open all the ports, you're warned before you save the changes.
3733

38-
![Illustration that shows getting connection string.](./media/how-to-connect-mongo-shell/get-connection-string-portal.gif)
39-
Once you have the connection string, you can either
40-
- Have the shell prompt you to enter the password or
41-
- Provide the password as a part of the connection string
34+
## Connect by using MongoDB Shell
4235

43-
2. Connect using Mongo Shell
36+
To add your Azure Cosmos DB cluster to MongoDB Shell, perform the following steps:
4437

45-
**A. By entering the password in the MongoShell Prompt**
38+
1. Retrieve the connection information for your Azure Cosmos DB for MongoDB (vCore) instance by using [these instructions](quickstart-portal.md#get-cluster-credentials).
4639

40+
![Animation that shows selections for getting a connection string.](./media/how-to-connect-mongo-shell/get-connection-string-portal.gif)
4741

48-
Your connection string would look like this:
49-
```
50-
"mongodb+srv://<username>@<servername>.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000"
51-
```
52-
Here's an example of how the command looks like:
53-
```
54-
mongosh "mongodb+srv://[email protected]/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000
55-
```
56-
![Illustration that shows how to connect by entering a password.](./media/how-to-connect-mongo-shell/mongo-shell-connect.gif)
42+
2. Connect by using either of these methods:
5743

58-
Once you provide the password and are successfully authenticated, you notice some warning. It states *"This server or service appears to be an emulation of MongoDB"*.
59-
The warning can be ignored. It's the shell's way of notifying that you aren't connection to an emulation of MongoDB. When, it's an Azure as a platform as a service offering it's expected.
44+
- Enter the password in the Mongo Shell prompt. Your connection string looks like this example:
6045

61-
**B. By providing the password as a part of the connection string**
46+
```
47+
"mongodb+srv://<username>@<servername>.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000"
48+
```
6249
63-
Alternately you can also use a connection string with the password in which case the format looks something like this.
64-
```
65-
mongosh "mongodb+srv://<SERVERNAME>.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000" --username "<USER>" -password "<PASSWORD>"
66-
```
50+
The command looks like this example:
6751
68-
Here's an example of how the command looks like:
69-
```
70-
mongosh "mongodb+srv://mongodbvcoretesting.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000" --username "testuser" -password "******"
71-
```
72-
![Screenshot that shows a password as a part of a connection string.](./media/how-to-connect-mongo-shell/connection-string-with-password.png)
52+
```
53+
mongosh "mongodb+srv://[email protected]/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000
54+
```
55+
56+
![Animation that shows how to connect by entering a password.](./media/how-to-connect-mongo-shell/mongo-shell-connect.gif)
57+
58+
After you provide the password and are successfully authenticated, this warning appears: "This server or service appears to be an emulation of MongoDB." You can ignore it. This warning is generated because the connection string contains `cosmos.azure`. Azure Cosmos DB is a native Azure platform as a service (PaaS) offering.
59+
60+
- Provide the password as a part of the connection string. The format looks something like this example:
61+
62+
```
63+
mongosh "mongodb+srv://<SERVERNAME>.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000" --username "<USER>" -password "<PASSWORD>"
64+
```
65+
66+
The command looks like this example:
67+
68+
```
69+
mongosh "mongodb+srv://mongodbvcoretesting.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000" --username "testuser" -password "******"
70+
```
71+
72+
![Screenshot that shows a password as a part of a connection string.](./media/how-to-connect-mongo-shell/connection-string-with-password.png)
7373
7474
## Next step
7575

articles/cosmos-db/mongodb/vcore/how-to-connect-studio-3t.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
---
22
title: Use Studio 3T to connect
3-
titleSuffix: Azure Cosmos DB for MongoDB vCore
4-
description: Connect to an Azure Cosmos DB for MongoDB vCore account using the Studio 3T community tool to query data.
3+
titleSuffix: Azure Cosmos DB for MongoDB in vCore architecture
4+
description: Connect to an Azure Cosmos DB for MongoDB (vCore architecture) account by using the Studio 3T community tool to query data.
55
author: gahl-levy
66
ms.author: gahllevy
77
ms.reviewer: sidandrews
88
ms.service: cosmos-db
99
ms.subservice: mongodb-vcore
1010
ms.topic: how-to
1111
ms.date: 08/28/2023
12-
# CustomerIntent: As a database owner, I want to use Studio 3T so that I can connect to and query my collections.
12+
# customer intent: As a database owner, I want to use Studio 3T so that I can connect to and query my collections.
1313
---
1414

15-
# Use Studio 3T to connect to Azure Cosmos DB for MongoDB vCore
15+
# Use Studio 3T to connect to Azure Cosmos DB for MongoDB (vCore)
1616

1717
[!INCLUDE[MongoDB vCore](~/reusable-content/ce-skilling/azure/includes/cosmos-db/includes/appliesto-mongodb-vcore.md)]
1818

19-
Studio 3T (also known as Robomongo or Robo 3T) is a professional GUI that offers IDE & client tools for MongoDB. It's a popular community tool to speed up MongoDB development with a straightforward user interface.
19+
Studio 3T is a professional GUI that offers IDE and client tools for MongoDB. It's a popular community tool to speed up MongoDB development with a straightforward user interface.
2020

2121
## Prerequisites
2222

23-
- An existing Azure Cosmos DB for MongoDB vCore cluster.
23+
- An existing Azure Cosmos DB for MongoDB (vCore architecture) cluster.
2424
- If you don't have an Azure subscription, [create an account for free](https://azure.microsoft.com/free).
25-
- If you have an existing Azure subscription, [create a new Azure Cosmos DB for MongoDB vCore cluster](quickstart-portal.md).
26-
- [Studio 3T](https://robomongo.org/) community tool
25+
- If you have an existing Azure subscription, [create a new Azure Cosmos DB for MongoDB (vCore) cluster](quickstart-portal.md).
26+
- The [Studio 3T](https://robomongo.org/) community tool.
2727

28-
## Connect using Studio 3T
28+
## Connect by using Studio 3T
2929

30-
To add your Azure Cosmos DB cluster to the Studio 3T connection manager, perform the following steps:
30+
To add your Azure Cosmos DB cluster to the Studio 3T Connection Manager, perform the following steps:
3131

32-
1. Retrieve the connection information for your Azure Cosmos DB for MongoDB vCore using the instructions [here](quickstart-portal.md#get-cluster-credentials).
32+
1. Retrieve the connection information for your Azure Cosmos DB for MongoDB (vCore) instance by using [these instructions](quickstart-portal.md#get-cluster-credentials).
3333

34-
:::image type="content" source="./media/connect-using-robomongo/connection-string.png" alt-text="Screenshot of the connection string page.":::
34+
:::image type="content" source="./media/connect-using-robomongo/connection-string.png" alt-text="Screenshot of the pane for connection strings.":::
3535

3636
1. Run the **Studio 3T** application.
3737

38-
1. Select the connection button under **File** to manage your connections. Then, select **New Connection** in the **Connection Manager** window, which opens another window where you can paste the connection credentials.
38+
1. Under **File**, select the **Connect** button to manage your connections. Then, in the **Connection Manager** dialog, select **New Connection**.
3939

40-
1. In the connection credentials window, choose the first option and paste your connection string. Select **Next** to move forward.
40+
1. In the **New Connection** dialog, select the first option and paste your connection string. Then select **Next**.
4141

42-
:::image type="content" source="./media/connect-using-robomongo/new-connection.png" alt-text="Screenshot of the Studio 3T connection credentials window.":::
42+
:::image type="content" source="./media/connect-using-robomongo/new-connection.png" alt-text="Screenshot of the dialog for entering connection credentials in Studio 3T.":::
4343

44-
1. Choose a **Connection name** and double check your connection credentials.
44+
1. On the **Server** tab, enter a name for **Connection name** and double-check your connection credentials.
4545

46-
:::image type="content" source="./media/connect-using-robomongo/connection-configuration.png" alt-text="Screenshot of the Studio 3T connection details window.":::
46+
:::image type="content" source="./media/connect-using-robomongo/connection-configuration.png" alt-text="Screenshot of server connection information in Studio 3T for a new connection.":::
4747

48-
1. On the **SSL** tab, check **Use SSL protocol to connect**.
48+
1. On the **SSL** tab, select **Use SSL protocol to connect**.
4949

50-
:::image type="content" source="./media/connect-using-robomongo/connection-ssl.png" alt-text="Screenshot of the Studio 3T new connection TLS/SSL Tab.":::
50+
:::image type="content" source="./media/connect-using-robomongo/connection-ssl.png" alt-text="Screenshot of SSL details in Studio 3T for a new connection.":::
5151

52-
1. Finally, select **Test Connection** in the bottom left to verify that you're able to connect, then select **Save**.
52+
1. Select **Test Connection** to verify that you can connect, and then select **Save**.
5353

5454
## Next step
5555

0 commit comments

Comments
 (0)