How to start MongoDB on a remote server and then how to connect to it

108 views
Skip to first unread message

Monica at IBM

unread,
Aug 22, 2018, 12:23:19 PM8/22/18
to mongodb-user
Hello, please help a rookie with a tight deadline! I have read the manual, many responses on this group and many other forums, but cannot find a response I can understand.

I installed MongoDB on a Windows 2012 remote server and created a few Collections. This server I can access using Remote Desktop Connection.

My team needs to develop reports and forms from their development laptops at home, so:

1. How do I start MongoDB from a remote machine?
2. How do I set up MongoDB so that they can access it remotely?
3. How do they access it remotely? some will use ODBC others will use connection strings.
4. How can I access it remotely using Compass?

Thank you very much.

MH

unread,
Aug 22, 2018, 1:30:57 PM8/22/18
to mongodb-user
1. if youre talking about starting the database remotely and you installed it as a Windows service you could use sc \\computername start servicename. I would think it would be running all the time though and have data in it for people to query to run the reports
2 -  You'll want to make sure you have mongod bound to an ip accessible to them while on whatever vpn or network they are on. in the config you'll need something like this where 1.2.3.4 is your internal network ip. note- you should really enable auth like the below too...
net:
    bindIp: 127.0.0.1,1.2.3.4
    port: 27017
security:
    authorization: "enabled"
3-if they are using some sort of dev kit then that dev kit should have a way to add a driver. in house we use the c# driver for our application and have connection strings in config files. easiest way though is just use shell, which means they would need to run the installer for the shell, or grab the bin files, which includes mongo.exe
4-compass is essentially just plugging in the ip mongod is bound to in the config lines i mentioned above with user/pass and you'll be connected. robo3t is also an option as an interface to run queries from... or just use the shell.

Monica at IBM

unread,
Aug 22, 2018, 2:37:07 PM8/22/18
to mongod...@googlegroups.com
THANK YOU. I'll try all of these options. Will report back. Very much appreciated!

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/TS1q33iBBW8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/b652f57f-5866-4911-9666-8567632daf43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bob Cochran

unread,
Aug 22, 2018, 3:41:03 PM8/22/18
to mongod...@googlegroups.com
Hi!

In addition to what MH says, you may need to configure the Microsoft Windows firewall that should be running on the server box that is running mongod. The firewall has to allow inbound and outbound traffic on the IP address and port given as the BindIp in the mongod configuration file. The remote computers might have firewalls running on them too, and each remote computer will have to be configured to allow traffic from the server. 

Usually you need help from network administrators to do this especially if your systems are under active directory and/or group policy control. 

Thanks

Bob
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.

To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.

Robert Cochran

unread,
Aug 22, 2018, 7:07:21 PM8/22/18
to mongodb-user
I'd like to expand on MH and my earlier reply a little bit more. I think that in general you may have a firewall issue here. Most large enterprises implement firewall configurations of various kinds. Your VPN could be filtering out all network traffic through the VPN which goes to and from your mongod server. So you would need to put in a request to your VPN administrators to allow network connections to be made to the ip address and port that mongod is listening on. Then you must also check if the remote client machines have firewalls running which are blocking this traffic, and if the server host operating system has a firewall running, too. And you will have to determine if a firewall issue exists and if so, who can allow your network traffic to go through. In my own enterprise we have n firewalls set up. It takes time to put in a request to the correct administrators, get the request approved, and then get the change implemented. 

Thanks so much

Bob

Joseph Smallbone

unread,
Aug 23, 2018, 10:41:20 AM8/23/18
to mongod...@googlegroups.com
Hi,

How much is it to set up a database.

Kind regards

Joe Smallbone


From: mongod...@googlegroups.com <mongod...@googlegroups.com> on behalf of Robert Cochran <r2coc...@gmail.com>
Sent: Thursday, August 23, 2018 12:07:21 AM
To: mongodb-user
Subject: Re: [mongodb-user] Re: How to start MongoDB on a remote server and then how to connect to it
 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.

To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
Reply all
Reply to author
Forward
0 new messages