Home > AI > Database > MongoDB >

MongoDB Compass connect remote db

Step 1: check mongo remote connection is enabled?

$ mongo --host {hostname}

If you see connection is failed, then you need to configure the mongodb.

Step 2: modify the configuration fil

$ vi /etc/mongod.conf

bindIp: 127.0.0.1,09.23.43.12(your host ip address)

Step 3: restart mongo

$ systemctl restart mongod

Leave a Reply