Skip to content

Commit 42101ca

Browse files
authored
fix(mongodb): Update documentation about connection string (#4387)
1 parent a874b40 commit 42101ca

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

pages/managed-mongodb-databases/how-to/connect-database-instance.mdx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ categories:
1414
---
1515

1616
<Message type="important">
17-
Managed MongoDB® is currently in private beta. Click [here](https://www.scaleway.com/en/managed-mongodb/) to join the waiting list.
17+
Managed MongoDB® is currently in public beta. Click [here](https://www.scaleway.com/en/managed-mongodb/) to join the waiting list.
1818
</Message>
1919

2020
<Macro id="requirements" />
@@ -44,7 +44,7 @@ To connect to a public endpoint using the MongoDB® shell:
4444

4545
1. Replace the following variables in the command as described:
4646
```sh
47-
mongosh "mongodb+srv://{instance_id}.mgdb.{region}.scw.cloud" --tlsCAFile {your_certificate.pem} -u {username}
47+
mongosh "mongodb+srv://{db-instance-id}.mgdb.{region}.scw.cloud" --tlsCAFile {your_certificate.pem} -u {username}
4848
```
4949

5050
- `{your-certificate.pem}` - the TLS certificate downloaded on **step 3**.
@@ -57,20 +57,26 @@ To connect to a public endpoint using the MongoDB® shell:
5757

5858
If the connection is successful, you should see the following message display on your console, and be able to write queries:
5959
```sh
60-
The server generated these startup warnings when booting
61-
Powered by MongoDB® v0.9.0 and PostgreSQL 14.6.
60+
Current Mongosh Log ID: 67ab0096d43bcc1d9ed4336d
61+
Connecting to: mongodb+srv://<credentials>@{db-instance-id}.mgdb.{region}.scw.cloud/?appName=mongosh+2.3.8
62+
Using MongoDB: 7.0.12
63+
Using Mongosh: 2.3.8
64+
65+
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
66+
67+
rs-{db-instance-id} [primary] test>
6268
```
6369

64-
Follow the same procedure to connect to a private endpoint for one node, replacing `{privateNetorkName}` with the name of your Private Network:
70+
Follow the same procedure to connect to a private endpoint for one node, replacing `{privateNetworkId}` with the `ID` of your Private Network:
6571

6672
```sh
67-
mongosh "mongodb://{instance_id}-0.{privateNetworkName}" -u {username}
73+
mongosh "mongodb://{db-instance-id}-0.{privateNetworkId}" -u {username} --tlsCAFile {your_certificate.pem}
6874
```
6975

70-
For multiple nodes, replace `{db-instance-id}` with the Database Instance UUID of each respective Instance, and `{privateNetworkName}` with the names of your Private Network:
76+
For multiple nodes, replace `{db-instance-id}` with the Database Instance UUID of each respective Instance, and `{privateNetworkId}` with the `ID` of your Private Network:
7177

7278
```sh
73-
"mongodb://{instance_id}-0.{privateNetworkName},{instance_id}-1.{privateNetworkName},{instance_id}-2.{privateNetworkName}" -u {username}
79+
"mongodb://{db-instance-id}-0.{privateNetworkId},{db-instance-id}-1.{privateNetworkId},{db-instance-id}-2.{privateNetworkId}" -u {username} --tlsCAFile {your_certificate.pem}
7480
```
7581

7682
### Python
@@ -272,4 +278,4 @@ exampleDoc.save()
272278
.catch(err => {
273279
console.error('Error saving document', err);
274280
});
275-
```
281+
```

0 commit comments

Comments
 (0)