skip to Main Content

I intsalled MongoDB on my windows 11 computer, but when i run mongosh in my cmd it returns access denied

>mongosh access Denied

this is what appears when i run the command

i tried uninstalling and reinstalling and adding it to the environment variables.
C:Program FilesMongoDBServer7.0bin

2

Answers


  1. Chosen as BEST ANSWER

    I realised that i dint have a mongosh file in my bin folder(user/programfiles/mongo/server/bin/), so i had to download the mongoshell. you can download it from here('https://www.mongodb.com/try/download/shell'). then after downloading it extract it and then go to the bin folder of the newly downloaded mongoshell and copy the path of the bin folder, then add it to the environment variaboles, restart your terminal and vwalla!


  2. You can run this by enabling Compatibility mode of mongosh exe file. Check this post for detailed answer: https://answers.microsoft.com/en-us/windows/forum/all/this-app-cant-run-on-your-pc/f94db755-9416-470a-9532-de9dc6ec53d2

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search