MongoDB YAML "Unidentified Option: Security"

I am running Mongo DB version 2.6 on Windows Server 2012. I am having problems setting up a YAML configuration file for security and authorization. When I have the following configuration file, I get the error message "Unrecognized option: security". What is wrong with my configuration?

mongod_test.conf:

security:
    authorization: enabled
    authenticationMechanisms: MONGODB-CR
storage:
   dbPath: F:\MongoData

Command line:

mongod.exe --config mongod_test.conf

I added spaces to my file and fixed part of the problem. With the updated configuration on top, the current error I get is:

c:\MongoDBFolder\bin>mongod.exe --config mongod_test.conf
    Unrecognized option: security.authenticationMechanisms
    try 'mongod.exe --help' for more information
+4
source share
5 answers

, Yaml + , ;

security:
    authorization: enabled
    authenticationMechanisms: MONGODB-CR
storage:
   dbPath: F:\MongoData
+14

, ":" -, , dbPath .

+1

:

Unrecognized option: security.authenticationMechanisms

, authenticationMechanisms .

:  http://docs.mongodb.org/manual/reference/configuration-options/#security

, authenticationMechanisms - "setParameter", :

http://docs.mongodb.org/manual/reference/parameters/#param.authenticationMechanisms

, , .

, , , :

security:
   authorization: enabled
setParameter:
   authenticationMechanisms: MONGODB-CR    
storage:
  dbPath: "F:\MongoData"
+1

, ASCII. mongod , ASCII, UTF-8.

0

SSL, , , .

:

" : net.ssl.mode"

mongodb. brew, mongodb ssl. , --with-openssl.

brew install mongodb --with-openssl
0

Source: https://habr.com/ru/post/1538441/


All Articles