MongoDB Connection String MongoDB connection information can either be entered using a connection string or breaking the host, port, user, password, etc. into separate fields. If using a connection string, the following format should be used: mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[database][?options]] Example 1 with no authentication: mongodb://mongodb0.example.com:27017/admin Example 2 with authentication mongodb://myDBReader:D1fficultP%40ssw0rd@mongodb0.example.com:27017/admin |
|