MongoDB

Connect to MongoDB remotelly

CentOS 6.5 example

 

1.Put bind_ip to 0.0.0.0 instead of 127.0.0.1

# vim /etc/mongodb.conf

bind_ip = 0.0.0.0
port = 27017
fork = true
pidfilepath = /var/run/mongodb/mongodb.pid
logpath = /var/log/mongodb/mongodb.log
dbpath =/var/lib/mongodb
journal = true

 

 

2. Restart mongo

#service mongod restart

 

 Now it is possible to connect to MongoDB on your server from your home computer by: mongodb://vps.mikosft.info:27017/crawler