snippetMinor
How to add setParameter in mongod config?
Viewed 0 times
mongodconfighowsetparameteradd
Problem
When I am using setParameter in mongod config, I start mongod with error:
How can I use setParameter from config file ?
P/S: I am using YAML config file format.
Unrecognized option: setParameter = enableLocalhostAuthBypass=1How can I use setParameter from config file ?
P/S: I am using YAML config file format.
Solution
Here's a working example that I just tested using 2.6.6 - I specified two parameters just to show how it is done for reference:
storage:
dbPath: "/data/db/test"
systemLog:
destination: file
path: "/data/db/test/mongodb.log"
processManagement:
fork: true
setParameter:
enableLocalhostAuthBypass: 1
enableTestCommands: 1Code Snippets
storage:
dbPath: "/data/db/test"
systemLog:
destination: file
path: "/data/db/test/mongodb.log"
processManagement:
fork: true
setParameter:
enableLocalhostAuthBypass: 1
enableTestCommands: 1Context
StackExchange Database Administrators Q#87615, answer score: 7
Revisions (0)
No revisions yet.