§2024-11-03

  1. MongoDB Shell Download

MongoDB Shell is the quickest way to connect to (and work with) MongoDB. Easily query data, configure settings, and execute other actions with this modern, extensible command-line interface — replete with syntax highlighting, intelligent autocomplete, contextual help, and error messages.

$ wget https://downloads.mongodb.com/compass/mongosh-2.3.3-linux-arm64.tgz   

$ tar xvf src/mongosh-2.3.3-linux-arm64.tgz 
mongosh-2.3.3-linux-arm64/
mongosh-2.3.3-linux-arm64/.sbom.json
mongosh-2.3.3-linux-arm64/LICENSE-crypt-library
mongosh-2.3.3-linux-arm64/LICENSE-mongosh
mongosh-2.3.3-linux-arm64/README
mongosh-2.3.3-linux-arm64/THIRD_PARTY_NOTICES
mongosh-2.3.3-linux-arm64/bin/
mongosh-2.3.3-linux-arm64/mongosh.1.gz
mongosh-2.3.3-linux-arm64/bin/mongosh
mongosh-2.3.3-linux-arm64/bin/mongosh_crypt_v1.so
``

sudo cp mongosh /usr/local/bin/ sudo cp mongosh_crypt_v1.so /usr/local/lib/


- example 

alexlai@opi58G:~$ mongosh --host redisMongo03.yushei.com.tw:27017,redisMongo04.yushei.com.tw:27017,redisMongo05.yushei.com.tw:27017 --username siteRootAdmin --password b23258585 --authenticationDatabase admin Current Mongosh Log ID: 6726fd3e3185bf7a5ff7c613 Connecting to: mongodb://@redisMongo03.yushei.com.tw:27017,redisMongo04.yushei.com.tw:27017,redisMongo05.yushei.com.tw:27017/?authSource=admin&appName=mongosh+2.3.3 Using MongoDB: 5.0.8 Using Mongosh: 2.3.3

For mongosh info see: https://www.mongodb.com/docs/mongodb-shell/

To help improve our products, anonymous usage data is collected and sent to MongoDB periodically (https://www.mongodb.com/legal/privacy-policy). You can opt-out by running the disableTelemetry() command.


ys20220318 [primary] test> show dbs Dragonfly28 2.51 GiB LaiKos 131.43 MiB YuSheiDB 3.20 GiB YuSheiFAB 752.00 KiB YuSheiReactTest 4.34 MiB YuSheiWildduck 2.39 MiB admin 2.67 MiB config 332.00 KiB local 29.81 GiB syslog_ng_db 1.08 MiB yusheiDBTest 122.14 MiB yusheiMotorDB 36.97 MiB yusheiRedisTest 59.95 MiB zone-mta 400.00 KiB