Baibhav Shukla
Baibhav Shukla

Reputation: 41

Unable to connect to mongodb after installation

I am trying to install mongodb on WSL. I can install mongodb successfully but when trying to use the command mongosh I am getting the error command not found. How to fix this

 mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2024-01-07 13:02:20 IST; 4min 56s ago
       Docs: https://docs.mongodb.org/manual
   Main PID: 204 (mongod)
     Memory: 287.7M
     CGroup: /system.slice/mongod.service
             └─204 /usr/bin/mongod --config /etc/mongod.conf

Jan 07 13:02:20 systemd[1]: Started MongoDB Database Server.
Jan 07 13:02:20 mongod[204]: {"t":{"$date":"2024-01-07T07:32:20.677Z"},"s":"I",  "c":"CONTROL",  "id":7484500, "ctx":"main","msg":"Environment variable MONGODB_CONFIG_OVERRIDE_NOFORK == 1, o>

When I am executing mongosh command getting error mongosh: command not found

Upvotes: 0

Views: 89

Answers (1)

giocchi27
giocchi27

Reputation: 1

you have to install mongosh

there is also a guide tool

Upvotes: 0

Related Questions