[SOLVED] BadValue: error: no args for –configdb try ‘C:Program FilesMongoDBServer6.0binmongos.exe –help’ for more information

Question

This Content is from Stack Overflow. Question asked by Emmanuel Dodoo

I finished installing MongoDB and i am trying the command $ mongo
and i keep getting an error : BadValue: error: no args for --configdb try 'C:Program FilesMongoDBServer6.0binmongos.exe --help' for more information
can someone please help.

Solution

I think you might have set up the config server as a standalone process and you might have to use a replicaset instead.

This might help: https://www.mongodb.com/docs/manual/sharding/

Your command will look something like this: mongos –configdb replsetname/localhost:27010 –port 27011

But if you are trying to use the mongoDb shell then you might have to download it separately. They do not bundle the shell together as they used to before. So you have to download mongosh as a zip and extract the contents of the “bin” folder to the “bin” folder where you have installed mongo. Then you can use the MongoDB shell(mongosh.exe).

Answered by Arpan-Crazyx_mOnkEy


This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 4.0.

people found this article helpful. What about you?