2

I have the following config file:

net:
  bindIp: 127.0.0.1
  port: 27017

storage:
  dbPath: c:\mongoDATA\db
  journal:
    enabled: true

##systemLog:
 ## destination: file
 ## path: C:\mongoDATA\log\mongodb.log   
 ## logAppend: true

this works, but when I try to add multiple ports like:

bindIp: 127.0.0.1, 192.168.10.115
or
bindIp: "127.0.0.1, 192.168.10.115"
or
bindIp: [127.0.0.1, 192.168.10.115]

with or without the space after the comma it doesn't. Could someone provide the write syntax? Thanks (using 3.6 community)

0

without a space after the comma, AND the ip address has to present

0

@DCR, Wrap the comma-separated-Ips with brackets.

For example suppose that we have multiple ips like (192.168.10.115,96.88.169.145) and loop back ip(127.0.0.1) then the binding syntax will be as mention below

bindIp = [127.0.0.1, 192.168.10.115, 96.88.169.145]

For further your ref Fix bindIp multiple address notation in Configuration Options, Here,Here and How to set mongod.conf bind_ip with multiple ip address

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.