MongoDB Connection Configuration
- 07 Dec 2022
- 1 Minute to read
-
Print
-
DarkLight
MongoDB Connection Configuration
- Updated on 07 Dec 2022
- 1 Minute to read
-
Print
-
DarkLight
This is a machine-translated version of the original Japanese article.
Please understand that some of the information contained on this page may be inaccurate.
summary
This page helps you configure connection information for MongoDB.
Input field
Item nameRequired | content | |
---|---|---|
name | Yes | Enter the name of the connection information to be used inside TROCCO. |
memorandum | No | Enter a memo of the connection information used inside TROCCO. |
Connection Type | No | Please select from the following.
For more information about connection types, see the official documentation - Connection String URI Format. |
host | Yes | Enter the hostname or IP address. |
Destination port | Yes | Enter the port number of the database to connect to. The default port number for MongoDB is 27017 . |
Authentication method | No | Please select from the following.
|
user | No | Enter your username for authentication. |
password | No | Enter your password for authentication. |
Authentication Database | No | Enter the authentication database (authSource). If not specified, it will be.admin |
Import settings | Yes | Please select from the options. The default isprimary .For details on import settings, see "About Read Preference" below. |
MongoDB authentication settings
MongoDB allows you to connect without setting up user authentication.
However, TROCCO recommends that you configure the user authentication settings.
About Read Refer
For more information about import settings, please check the official documentation - Read Preferences .
Selected | items |
---|---|
primary | (Default) Routes all read operations to the primary node of the current replica set. |
primaryPreferred | Route all read operations to the primary node. If the primary is unavailable, such as during an automatic failover, read requests are routed to the secondary node instead. |
secondary | Route all read operations to one of the secondary nodes. |
secondaryPreferred | Route all read operations to one of the available secondary nodes. If the secondary is unavailable, it is routed to the primary instead. |
nearest | Nodes with low network latency are selected for routing. Primary and secondary are treated equally. |
Was this article helpful?