User Tools

Site Tools


mongodb

This is an old revision of the document!


Quick Setup

For a quick setup with m and mtools on Debian/Ubuntu, download a script here.

npm install -g m  # Aaron Heckmann's verion manager
# m 8.0.15
# m mongosh 2.5.9
# m tools 100.13.0
# PATH=$PATH::~/.local/m/tools/versions/100.13.0/bin:~/.local/m/shell/versions/2.5.9/bin:~/.local/m/versions/8.0.15/bin
 
python3 -m pip install mtools psutil pymongo  # Thomas Rucksteiss' mtools
# mlaunch --init --replicaset --nodes 1 --sharded 2 --port 28000
# mongosh --port 28000

Key-file login

mongo -u __system -p "$(tr -d '\011-\015\040' < path-to-keyfile)" --authenticationDatabase local

MongoSH JSON

To increase the levels of JSON nesting to display (from the default of 6), run the following:

config.set("inspectDepth", Infinity)
mongodb.1765645071.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki