Skip to content

Instantly share code, notes, and snippets.

@mw866
Last active July 1, 2024 01:25
Show Gist options
  • Save mw866/bfc084c78b949317e5520dcf7254c269 to your computer and use it in GitHub Desktop.
Save mw866/bfc084c78b949317e5520dcf7254c269 to your computer and use it in GitHub Desktop.
#mongoDB
show dbs
use testdb
db.dropDatabase()
db.test.find( {} )
db.test.remove({ "_id" : ObjectId("622fe6b767d3cd1a9e5d5eec") })
sudo service mongo start
sudo systemctl enable mongod.service
mongosh "mongodb://localhost:27017"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment