Category "mongodb"

MongoDB - ReplicaSet - Failed to refresh key cache

I am deploying my first replica set on a Windows 10 machine with MongoDB 5.0. For the purpose of the tutorial, I want all the servers running on my machine, on

I'm trying to connect monogoDB with node.js, but the terminal is showing MongoAPIError: URI must include hostname, domain name, and tld

I'm trying to connect MongoDB with node.js, but the terminal is showing MongoAPIError: URI must include hostname, domain name, and tld Backend Code I have writt

Mongodb query with multiple $or inside $and

I want records which if type have 0 or 2 than status should not equal to 0 and if type = 3 then ignore status. I tried this way but not working. db.activities.f

Mongo DB Service is stopped automatically on frequent basis from Services

Mongo DB is called in every 1 minute to insert data. and in between this process, the Mongo DB service is auto-stopped frequently.

Connection to monitor closed MongoDB

I am trying to run my discord bot but I get this error [12/4/2021, 2:06:02 AM] - [INFO] - [ShardManager] Started 1 shards [12/4/2021, 2:06:28 AM] - [ERROR] - co

Zsh: Command Not found : mongo After trying to install mongodb 4.2 using brew

I have tried the following steps to install and setup mongodb in my mac from here https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/ but I got th

Find in which polygon certain coordinate (latitude, longitude) lies with MongoDB?

Let's say 100 documents (so to say polygons) in a collection named Areas with this structure: { ...otherFields, commonName: "Butwal", area: { type: "

What is mean by +srv in mongoDb connection string

I am new to MongoDB and just encountered two types of connection string. mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[datab

How do I use google cloud storage as a bucket to store user/client images in a MERN Stack app?

I'm working on a pretty vanilla boilerplate blog-style application using mongoDB, express, react and node. It allows for user registration, authentication, for

Is there a way to perform subquery on MongoDB using collection.aggregate() and PHP Driver?

I am migrating a MySQL table which has 50 million+ rows and 40 columns to a MongoDB database. This table data is shown on a html table and every column is searc

Read-only file system when attempting mkdir /data/db on Mac [closed]

I am trying to create a new folder in the main directory Tried all kinds of examples sudo mkdir /data/db sudo mkdir -p /data/db I keep

Rust update mongo document

I'm trying to update my document, if I don't pass a field it is being deleted. my document is { "_id":"27fc47a4-0730-446c-8acd-41aa6e227406", "user_id":"a

MongoDB - Group by inner element

I am explaining with a simple example see my MongoDB collection looks like this: [ { pid: erwer, qty: 3, LevelDetails: {

Too much MongoDB connections when running Node.js mongoose app in Google Cloud Run

I am running a Node.js API connecting to MongoDB Atlas with mongoose. The Node.js API runs on Google Cloud Run. I open one connection using mongoose mongoose.co

MongoDB - Update an Key

I have been trying to update an Object for this collection. Below is the collection. Looking for Server 3.6 version. Here The ask is Need to update the class na

Mongoose - Update an object inside nested array

My Mongo schema looks like this, I want to update a flashcard object located in an array of flashcard also located in an array of subject. const classrooms = ne

MongoDB query to find top store from list of orders

I'm pretty new to Mongo. I have two collections that look as follows. Order collection [ { id: 1, price: 249, store: 1, status: true

How to fix this MongoClient connection?

I'm trying to connect a node.js app (written in TS) to MongoDB at Yandex Cloud. I have successfully connected there via mongosh: mongosh "mongodb://<user>

Can I use GCP Snapshot for data or database backup? can I trust the snapshot to restore my DB data?

I am using the Google cloud platform and compute engine for my project, Installed MongoDB into the instance server, what is the best way to take my database bac

Error: A required parameter (id) was not provided as a string in getStaticPaths for /location/[id] [duplicate]

im working on a next.js and mongodb website and im following this tutorial exactly but with different files/variable names. i keep running int