Questions tagged [mongodb-compass]

MongoDB Compass is MongoDB’s own GUI tool for database management, visualization, and CRUD operations. It supports the latest MongoDB versions and is available on Linux, Mac, or Windows. mongodb-compass tag should be used when posting questions related to this tool.

The GUI for MongoDB. Visually explore your data. Run ad hoc queries in seconds. Interact with your data with full CRUD functionality. View and optimize your query performance. Available on Linux, Mac, or Windows. Compass empowers you to make smarter decisions about indexing, document validation, and more.


Development:

All versions of MongoDB Compass are source available and free to use. You can find the source repositories for MongoDB Compass at https://github.com/mongodb-js/compass/.

Running Compass locally requires Node.js and npm:

  • Node.js: ^12.4.0
  • npm: >=6.13.0
npm install
npm start [compass|compass-readonly|compass-isolated]

For issues, create a ticket in JIRA Project.

Is there anything else you’d like to see in Compass? Submit suggestions in our feedback forum.

478 questions
112
votes
5 answers

Searching by ObjectId on Mongo Compass

How does one use Mongo Compass and search by ObjectID? I've been searching for the documentation for this but haven't been successful with anything. I have tried: { "_id" : "58f8085dc1840e050034d98f" } { "$oid" : "58f8085dc1840e050034d98f" } {…
aamirl
  • 1,420
  • 2
  • 12
  • 18
111
votes
5 answers

How to execute update ($set) queries in MongoDB Compass tool?

I'm new to MongoDB Compass tool and am trying to update a field in my collection. Please can someone suggest where the update query must be written. Could find no options or panes in the tool to write custom queries be it selection / updation for…
Patrick
  • 1,635
  • 2
  • 13
  • 23
49
votes
15 answers

Could not connect to MongoDB on the provided host and port

I just want to try MongoDB Compass GUI for MongoDB, but when I try to connect using local host port: 27017 I get this error: Could not connect to MongoDB on the provided host and port I followed these instructions on YouTube.
Ege Kuzubasioglu
  • 5,991
  • 12
  • 49
  • 85
46
votes
1 answer

MongoDB Compass: select distinct field values

I am using MongoDB Compass and don't have Mongo Shell. I need to build a query using MongoDB Compass tool to select distinct values of the "genre" field from my collection. Sample…
javapedia.net
  • 2,531
  • 4
  • 25
  • 50
32
votes
1 answer

How to sort data using MongoDB Compass

I'm currently trying to use MongoDB Compass to query my collection. However, I seem to be only able to filter the data. Is there any way for me to sort the data as well? I would like to sort my data in ascending order using one of my data fields. If…
Aabhas
  • 363
  • 1
  • 4
  • 9
30
votes
4 answers

See / setup a user with MongoDB Compass?

With MongoDB Compass is it possible to see users for a database or create new ones?
Evanss
  • 23,390
  • 94
  • 282
  • 505
29
votes
12 answers

Windows MongoDB - Installed Compass but can't find Compass within system

I ran the MongoDB Community Version Download Setup with the GUI for Mongo - Compass checked. No problems with the installation and the setup was successfully completed. However after the setup I couldn't find Compass installed anywhere in my…
Jebathon
  • 4,310
  • 14
  • 57
  • 108
27
votes
5 answers

Export database from MongoDb atlas to the local machine Monogo compass

I have remote database in Atlas with name of "test" and I want to download collection name image_table as a JSON file. In mac terminal: $ mongoexport –db test –collection image_table image.json I got the error> 020-01-16T13:49:12.822+0100 error…
Farbod Aprin
  • 990
  • 1
  • 10
  • 20
26
votes
5 answers

How to run Native mongo query in mongoDB Compass?

I'm trying to find data using native Mongo queries, but can't do it. It seems mongoDB Compass only provides filter property for fetching data. As in case of SQL's (say phpmyadmin, mysqlWorkbench, toad), we can easily execute native queries directly…
Jabongg
  • 2,099
  • 2
  • 15
  • 32
25
votes
1 answer

How to set index type 'text' using mongodb compass?

I am currently using mongodb compass, I want to create index with type 'text'. I followed steps given on https://docs.mongodb.com/manual/indexes/#single-field. However, I failed to create index with type 'text'. In compass GUI, dropdown titled…
Kiran
  • 2,147
  • 6
  • 18
  • 35
24
votes
2 answers

MongoDB Compass timeouts

I'm using MongoDB Compass to perform an aggregation on a reasonably large dataset (~2,000,000 documents, 300MB) through an SSH tunnel. It connects fine and I can query but stages in my pipeline appear to timeout operation exceeded time limit. I…
Dan
  • 11,914
  • 14
  • 49
  • 112
20
votes
1 answer

MongoDB Compass filter (query)

In mongoDB compass I am getting no result with the below filters. Not sure what I am doing wrong. {user: {uid: 'ttorone'}} {user: {_id: ObjectId("5b9fc9567a1f050026a8bbda")}} What I want is to filter out this document (where user-> uid is…
Pradeep Singh
  • 1,094
  • 1
  • 9
  • 24
19
votes
1 answer

Export aggregated data using MongoDB Compass

Can we export aggregated data from MongoDB compass 'Aggregation' section after applying the last stage of aggregation? Like we can do it easily using 'export data' option under 'Documents' section and we get options to export it as JSON and CSV. I…
Priyanka S
  • 215
  • 1
  • 2
  • 6
19
votes
2 answers

Unable to connect to AWS Documentdb using MongoDB Compass. No option to pass sslInvalidHostName

AWS DocumentDB is a relatively new service we're trying to migrate to. To connect from outside of the VPC, you have to create a tunnel to an existing instance. For example: ssh -i "ec2Access.pem" -L…
17
votes
4 answers

MongoDB Compass $match and $text results in "Expected "[" or AggregationStage but "{" found."

Doing a simple $match aggregation results in the Expected "[" or AggregationStage but "{" found. error. { $text: { $search: "search query" } }
Modermo
  • 1,852
  • 2
  • 25
  • 46
1
2 3
31 32