[DOCS-1378] Comment on: "manual/reference/connection-string.txt" Created: 11/Apr/13  Updated: 03/Nov/17  Resolved: 15/Apr/13

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: auto Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: Mac OS X 10.8.3
Application: php 5.2.3
Driver: Doctrine 1.0.2 driver (from: https://github.com/doctrine/mongodb)

Location: http://docs.mongodb.org/manual/reference/connection-string/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
Referrer: https://www.google.com/
Screen Resolution: 1920 x 1080
repo: docs
source: reference/connection-string


Participants:
Days since reply: 10 years, 44 weeks, 2 days ago

 Description   

The page does not include a connection string for a database with options.

For example, I wanted to connect to a database and provide a replicaset name in the URI. Given the reference material I would expect to use:

mongodb://myuser:myspass@primaryserver.domain.com:37017,primaryserver.domain.com:37027/mydata?replicaSet=myreplicaset

I believe the string above to be correct. If this was in the documentation and explicitly described then I would know that the mongo client I was using was failing to parse the string correctly. Currently I don't know what the problem is.



 Comments   
Comment by Sam Kleinman (Inactive) [ 15/Apr/13 ]

The database specified in the connection string only specifies the database that contains the authentication credentials and does not signify the database for the created connection object. The connection string exists at the connection level which is not associated with a specific database.

I hope this clarifies the documentation, and answers your question.

Cheers,
sam

Generated at Thu Feb 08 07:40:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.