HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How to add setParameter in mongod config?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
mongodconfighowsetparameteradd

Problem

When I am using setParameter in mongod config, I start mongod with error:

Unrecognized option: setParameter = enableLocalhostAuthBypass=1


How 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: 1

Code Snippets

storage:
    dbPath: "/data/db/test"
systemLog:
    destination: file
    path: "/data/db/test/mongodb.log"
processManagement:
    fork: true
setParameter:
    enableLocalhostAuthBypass: 1
    enableTestCommands: 1

Context

StackExchange Database Administrators Q#87615, answer score: 7

Revisions (0)

No revisions yet.