MongoDB
Jump to navigation
Jump to search
wikipedia:MongoDB (Feb 2009, trends, Nasdaq-100) is an open-source document-oriented database using a JSON-like documents with schema. Listen by default on port TCP 27017.
- CEO: Dev Ittycheria
- Installation:
brew tap mongodb/brew && brew install mongodb-community - Runnig manually:
mongod --config /usr/local/etc/mongod.conf --fork - MongoDB Compass:
brew install mongodb-compass /var/log/mongodb/mongodb.log/var/lib/mongodb/
Features[edit]
- Ad-hoc queries
- Indexing
- Sharding
- Replication
- Load balancing
- File storage
- Aggregation
- Server-side JavaScript execution
- Capped collections
- ACID transactions
Binaries[edit]
mongoMongoDB shellmongodbmongosMongoDB Sharded Cluster Query Routermongotopmongodumpmongorestoremongoexportmongoimportmongoreplaymongostatmongoperf
Editions[edit]
- MongoDB Community Server
Releases[edit]
- 4.2
Configuration[edit]
/etc/mongod.conf
Commands[edit]
- Connect to mongoDB:
mongoormongo --host IP_TO_CONNECT - List databases:
show dbsorshow databases - Connect to a database:
use <your_db_name> - Backup your_db_name database to a file (
--archive):mongodump --archive=test.20150715.archive --db your_db_name - Backup database to binary JSON (BSON) files (
--out):mongodump --host mongodb1.example.net --port 37017 --username user --password "pass" --out /opt/backup/mongodump-2011-10-24 mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1 --bind_ip_alldb.myCollection.find()ordb.myCollection.find().pretty()show tables,show collectionsdb.users.find({"name": /.*m.*/})ordb.users.find({"name": /m/})- db.YOUR_COLLETION.find().sort({_id:1}).limit(50);
mongo --eval "printjson(db.serverStatus())"
Docker[edit]
Related terms[edit]
- MongoDB Atlas cloud service
- Eliot Horowitz CTO and founder
- Ops Manager
prometheus-mongodb-exporter- Rocket.Chat
- GridFS
- MongoDB logs
- MERN stack
- Amazon DynamoDB and AWS DMS
- Collections
Activities[edit]
- Read about MongoDB replication capabilities https://docs.mongodb.com/manual/faq/replica-sets/
- Read about MongoDB authentication: https://docs.mongodb.com/manual/core/authentication/ https://stackoverflow.com/questions/4881208/how-to-secure-mongodb-with-username-and-password
See also[edit]
- MongoDB: MongoDB Compass,
mongo,mongodump, mongorestore,mongoexport, MongoDB changelog, MongoDB Enterprise Kubernetes Operator, GridFS, MongoDB Atlas, MongoDB replication, Ops Manager, docker logs mongodb, show collections, show dbs,mongo --help - NoSQL: Graph database, document-oriented database, Couchbase, Amazon DynamoDB, Amazon DocumentDB, MongoDB, FoundationDB, RavenDB
Advertising: