Connecting to a Remote Mongo Database with Replica Sets
- Updated2025-02-19
- 1 minute(s) read
Connecting to a Remote Mongo Database with Replica Sets
Connect to a remote MongoDB instance with replica sets to create redundancy in your database and mitigate data loss.
- A server running SystemLink 2021 R1 or later
- Multiple servers hosting a MongoDB replica set
- A user with the readWriteAnyDatabase role and the createCollection
privilegeNote The readWrite role does not include the createCollection privilege.
- Log into the desktop of the SystemLink server with administrator privileges.
- Launch the NI SystemLink Server Configuration and navigate to the NoSqlDatabase tab.
-
Enable Connect to an externally managed NoSqlDatabase
server.
Note NI recommends securing communications between your SystemLink server and MongoDB instance with TLS.
- Enable Use a custom connection string.
- Enter a connection string that adheres to the MongoDB standard connection string format. Refer to Connection String Format for more information.
- Click Test Connection to ensure SystemLink can connect to the MongoDB instance.
- Click Apply to restart SystemLink service manager and connect to the MongoDB instance.
Related Information
- MongoDB TLS
- Connection Strings
- MongoDB Compass
- MongoDB Support Limitations
Learn about the limitations that might prevent SystemLink from connecting to your MongoDB instance.
- Connection String Format
Consider the following guidelines when formatting your connection string to connect to a MongoDB instance.