在MongoDB Windows中将辅助服务器添加到副本集

时间:2019-03-24 12:38:11

标签: mongodb

我正在尝试将第二个副本集添加到主要副本。

主要= 192.168.56.52:27017
备用= 192.168.56.136:27017

    # mongod.conf

    # for documentation of all options, see:
    #   http://docs.mongodb.org/manual/reference/configuration-options/

    # Where and how to store data.
    storage:
      dbPath: **mypath**\DBs
      journal:
        enabled: true
    #  engine:
    #  mmapv1:
    #  wiredTiger:

    # where to write logging data.
    systemLog:
      destination: file
      logAppend: true
      path:  **mypath**\mongod.log

    # network interfaces
    net:
      port: 27017
      bindIp: 0.0.0.0


    #processManagement:

    #security:
    #operationProfiling:

    replication:
      replSetName: configServers

    #sharding:

    ## Enterprise-Only Options:

    #auditLog:

    #snmp:
    #mp:

但是当我尝试添加
rs.add(“ 192.168.56.136:27017”) 它显示为图片。 result
请帮助获得运行副本集。谢谢
我在Windows上运行,并使用service启动copysetset。

0 个答案:

没有答案
相关问题