Questions tagged [mongodb]

MongoDB is a scalable, high-performance, open source, document-oriented database. Official builds are available for Linux, Windows, OS X and Solaris. Database administration questions are generally better suited to dba.stackexchange.com

MongoDB Logo

MongoDB is a widely used, general-purpose, document-oriented NoSQL database with features including high-availability replication and auto-sharding for horizontal scaling. The MongoDB database server and tools, written in C++, are open-sourced and available under AGPL v3.0 license or a Commercial License. MongoDB has strong support for dynamic querying and aggregating data including MapReduce and an Aggregation Framework. MongoDB uses BSON (Binary JSON) format for storage purposes and the MongoDB Wire Protocol for communication between client drivers and the MongoDB server. Officially supported Drivers and Client Libraries are available for most popular programming languages, and there are also Community Supported Drivers which offer alternative implementations and support for further programming languages.

The latest MongoDB server releases can be installed via common packaging systems or downloaded as binary archives from mongodb.org. It should be noted that many Linux distributions package MongoDB in their own repositories, but that these generally lag behind the official MongoDB repository versions.

FAQ

The mongodb-user mailing list is very busy and almost every question on earth has been asked on there, so try searching the archives. Tip: searching Google with " site:groups.google.com/group/mongodb-user" added to your search terms generally works better than using the Google Groups search bar.

For help with data modeling (schema design), check out the Data Modeling Considerations for MongoDB Applications documentation page or search the mailing list archives.

MongoDB, Inc. (the company behind MongoDB) provides archives of many presentations from their events such as conferences and webinars.

Useful links

154 questions
37
votes
7 answers

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 command returns error

I'm trying to install Mongodb on Ubuntu 12 but when I run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 This returned the error below: keyserver.ubuntu.com host not found gpgkeys: HTTP fetch error 7: couldn't…
nyamka
  • 371
  • 1
  • 3
  • 3
36
votes
4 answers

Error: mongodb: unknown version :mountain_lion

I am running these simple commands on mac: brew upgrade mongodb or brew install mongodb I am getting this error below: Error: mongodb: unknown version :mountain_lion If i run the simple command: mongo , i get this MongoDB shell version…
Tray Fleary
  • 461
  • 1
  • 4
  • 5
13
votes
1 answer

How does the protocol "mongodb" work?

To connect to a MongoDB database from a NodeJS application, the documentation says to connect an address like this one: mongodb://localhost:27017/myproject where mongodb is the protocol, in place of http (or https). I'm curious how this works…
CodyBugstein
  • 1,515
  • 7
  • 23
  • 35
9
votes
2 answers

.tgz file – tar: Unrecognized archive format

I'm trying to install a 10gen build of MongoDB on my local Mac running Mountain Lion (10.8.3): I fetch it with curl at: curl http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.4.tgz > mongodb.tgz But I can't extract the build: Attempt 1: $…
AlienWebguy
  • 195
  • 1
  • 1
  • 6
7
votes
1 answer

Why journaling use so much space in mongodb?

I have a mongodb database that uses approximately 1GB of space. I was surprised when my server ran out of space, and then I realized that the journal uses 3GB. The documentation says that "Once MongoDB applies all the write operations in the…
lfagundes
  • 181
  • 1
  • 4
6
votes
1 answer

Can't start mongodb by launchctl on OS X Yosemite (10.10.2)

I've installed mongodb 2.4 via homebrew: brew install homebrew/versions/mongodb24 Then I've made a simlink to the config provided by homebrew: ln -sfv /usr/local/opt/mongodb24/homebrew.mxcl.mongodb24.plist ~/Library/LaunchAgents This file contains…
schfkt
  • 171
  • 1
  • 10
5
votes
2 answers

How to automatically restart MySQL and MongoDB when being unresponsive?

I’m running a simple development server (Ubuntu) on which MySQL and MongoDB sometimes crash. I always restart them with sudo service mysql restart. Although I know I need to investigate why they crash—and I will—I’m currently looking for a way to…
kramer65
  • 1,394
  • 4
  • 21
  • 43
5
votes
1 answer

Is MongoDB caching queries?

I am using MongoDB as my database for NodeJS system what working heavily with it database. I am using Mongoose module as database controller. My question is: Is MongoDB or Mongoose somehow caching queries? I am experiencing problems with fetching…
Baterka
  • 133
  • 1
  • 8
5
votes
1 answer

MongoDB: Getting SSL peer certificate validation failed: self signed certificate

I followed this tutorial to create a both a root CA certificate and then used it to sign a key for the mongod server. I run monogd with this configuration, by following this doc: net: ssl: mode: requireSSL PEMKeyFile:…
sagioto
  • 51
  • 1
  • 1
  • 5
5
votes
3 answers

After upgrading PHP to version 7, why can't I use the mongodb driver?

Well here's an odd situation I've found. I've been using PHP and MongoDB together on a project, and updated the associated software. After the upgrade, I did make sure to update the new conf files and all is well --- except when I try to use the…
dotVezz
  • 809
  • 2
  • 10
  • 17
4
votes
3 answers

Mongodb not shutting down via --shutdown command

i need help with a problem on shutting mongod down gracefully. I'm running mongodb on docker . i run mongod like with the command : mongod --config /etc/mongod.conf and when i close with : mongod --shutdown i get the message : There doesn't…
kommradHomer
  • 191
  • 1
  • 1
  • 9
4
votes
1 answer

Server Separation to avoid attacks?

I currently have 1 server with a full LAMP stack on it as well as Mongo DB. Is there any benefit to spliting up these services onto different servers in regards to redundancies? For example: Server 1 -> Apache/PHP Server 2 -> mySQL Server 3 ->…
user1641165
  • 157
  • 5
4
votes
2 answers

Sign in with mongo shell without having my password shown?

How can I sign into the mongo shell without showing my password? Everything says to either use mongo -u user -p password --authenticationDatabase admin or mongo > use admin; > db.auth('user', 'password') I don't like either one. The first leaves a…
Corey Ogburn
  • 686
  • 2
  • 12
  • 29
4
votes
2 answers

MongoDB: Can't drop local database with root user

I am trying to drop the local database in my replica set so that I can rename the replica set, but I keep getting the below error errmsg" : "not authorized on local to execute command { dropDatabase: 1.0, lsid: { id:…
siddhu
  • 195
  • 1
  • 7
3
votes
2 answers

PHP: Mongo client not found

I've installed XAMPP on my MacBook. PHP and MySQL are working fine, so I followed it up with mongo. I did the following: brew install mongo (success) brew install autoconf (success) sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongo…
zack_falcon
  • 1,033
  • 4
  • 20
  • 28
1
2 3
10 11