top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to connect MongoDB files which are stored in server from locally.

+1 vote
353 views

How to connect MongoDB data which is stored in remote server(I have remote server details) locally?And Is there in Mongo UI to connect or only commands will help?If so please give some links to run commands.

posted Feb 24, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
answer Feb 24, 2017 by Salil Agrawal
Similar Questions
+3 votes

while i am connecting from my windows machine to mongoDB server running on remote windows machine.
I am getting the following error.

MongoDB shell version: 3.0.4
connecting to: 192.168.0.103:27017/test
2015-06-20T15:16:52.584+0530 W NETWORK Failed to connect to 192.168.0.103:27017
after 5000 milliseconds, giving up.
2015-06-20T15:16:52.589+0530 E QUERY Error: couldn't connect to server 192.16
8.0.103:27017 (192.168.0.103), connection attempt failed
at connect (src/mongo/shell/mongo.js:181:14)
at (connect):1:6 at src/mongo/shell/mongo.js:181
exception: connect failed

+1 vote

We have a situation where we have the raw data files, but mongodump is no longer finishing. We want to get the data from the data files in a readable format (e.g. JSON). We are unable to extract the data from these files due to the header information.

Does anyone have a strategy for extracting the records from these files?

+3 votes

Here I would like to explain my query a bit more.

I inserted multiple documents within a collection. Few documents have same set of keys and few of them have some extra key:value pairs . For example:
document 1 : key1 : "key1"
document 2: key1 : "key1", key2: "key2"
document 3: key1 : "key1", key2: "key2", key3 : "key3"
document 4: key1 : "key1", key3 : "key3"

Now I want to delete the documents which have key1 and key2.
What will be the command to do so ?

+1 vote

I am trying to get all the collection names from MongoDb server using C# code using db.GetCollectionNames() method.

I have 12 collections in my database, but the above method returns an empty list. I have verified that I am referring to the correct database. What am I doing wrong? Or if there is an alternate way?

+1 vote

I generated some GridFs data on local MongoDB but I want to export these files only to production MongoDB.
I just have uploadtime field to query these files. Is there some option in Export to JSON by mongoexport both files and chunks after time stamp.

...