Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7786655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:27:08+00:00 2026-06-01T20:27:08+00:00

The connection string for Mongo process has /database option . What does it mean?

  • 0

The connection string for Mongo process has /database option . What does it mean? Does it mean it authenticates the particular database on mongo server.Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T20:27:09+00:00Added an answer on June 1, 2026 at 8:27 pm

    With the C# driver you typically would not use the option of putting a database name on the connection string. It is partially supported to provide some level of compatibility with other drivers.

    MongoServer.Create ignores the database name. Any credentials (username/password) on the connection string are used as default credentials for all databases.

    The database name is only used by MongoDatabase.Create, which calls MongoServer.Create and then just calls GetDatabase for you.

    So:

    var connectionString = "mongodb://localhost/database";
    var database = MongoDatabase.Create(connectionString);
    

    is just a shortcut for:

    var connectionString = "mongodb://localhost";
    var server = MongoServer.Create(connectionString);
    var database = server.GetDatabase("database");
    

    No authentication actually happens until you first try to use a database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In connection string to SQL Server there is max pool size option. My question
I have a connection string like this: SERVER=localhost;DATABASE=tree;UID=root;PASSWORD=branch;Min Pool Size = 0;Max Pool Size=200
If a connection string specifies Trusted_Connection=true with SQL Server authentication mode, will performance of
How to rewrite Webconfig connection string at runtime.I have input textbox for Server,UserName and
I have the following connection string: Data Source=localhost\\SQLEXPRESS; , it complains that '' is
I have the following connection string, and you will notice Provider's.Tests, notice the single
How to save connection string in XML so that I can subsequently use that
This is the connection string I am using. string connection = Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\CULVERT2.DBF;Extended Properties=dBASE
I have been tasked with securing the connection string in an classic ASP application
I am attempting to make a simple connection to a MySql database, located on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.