mongos.exe
Synopsis
mongos.exe is the build of the MongoDB Shard
(i.e. mongos) for the Windows
platform. mongos.exe has all of the features of
mongos on Unix-like platforms and is completely compatible
with the other builds of mongos. In addition,
mongos.exe provides several options for interacting with
the Windows platform itself.
This document only references options that are unique to
mongos.exe. All mongos options are
available. See the mongos Instances and the
Self-Managed Configuration File Options documents for more
information regarding mongos.exe.
To install and use mongos.exe, read the
Install MongoDB Community Edition on Windows document.
Options
--installInstalls
mongos.exeas a Windows Service and exits.If needed, you can install services for multiple instances of
mongos.exe. Install each service with a unique--serviceNameand--serviceDisplayName. Use multiple instances only when sufficient system resources exist and your system design requires it.
--removeRemoves the
mongos.exeWindows Service. Ifmongos.exeis running, this operation will stop and then remove the service.--removerequires the--serviceNameif you configured a non-default--serviceNameduring the--installoperation.
--reinstallRemoves
mongos.exeand reinstallsmongos.exeas a Windows Service.
--serviceName nameDefault: MongoS
Sets the service name of
mongos.exewhen running as a Windows Service. Use this name with thenet start <name>andnet stop <name>operations.You must use
--serviceNamein conjunction with either the--installor--removeoption.
--serviceDisplayName <name>Default: Mongo DB Router
Sets the name listed for MongoDB on the Services administrative application.
--serviceDescription <description>Default: Mongo DB Sharding Router
Sets the
mongos.exeservice description.You must use
--serviceDescriptionin conjunction with the--installoption.For descriptions that contain spaces, you must enclose the description in quotes.
--serviceUser <user>Runs the
mongos.exeservice in the context of a certain user. This user must have "Log on as a service" privileges.You must use
--serviceUserin conjunction with the--installoption.
--servicePassword <password>Sets the password for
<user>formongos.exewhen running with the--serviceUseroption.You must use
--servicePasswordin conjunction with the--installoption.