I am running Mongo DB version 2.6 on Windows Server 2012. I am having trouble setting up the YAML config file for for security and authorization. When I have the below config file I only receive an error saying "Unrecognized option: security". What is wrong with my config?
mongod_test.conf:
security:
authorization: enabled
authenticationMechanisms: MONGODB-CR
storage:
dbPath: F:\MongoData
Command line:
mongod.exe --config mongod_test.conf
I've added spaces back to my file and that fixes part of the problem. With the updated config from above the current error I am getting is:
c:\MongoDBFolder\bin>mongod.exe --config mongod_test.conf
Unrecognized option: security.authenticationMechanisms
try 'mongod.exe --help' for more information
Can't speak for your exact config, but Yaml requires colon+space to separate the keys and values, otherwise you'll get parse errors;
security:
authorization: enabled
authenticationMechanisms: MONGODB-CR
storage:
dbPath: F:\MongoData
Can you ensure there is a space after ":" for the key-value pair lines and also enclose the string values like dbPath value in quotes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With