The following table lists the default TCP ports used by MongoDB:下表列出了MongoDB使用的默认TCP端口:
27017 | mongod and mongos instances. mongod和mongos实例的默认端口。port or --port.port或--port更改此端口。
|
27018 | mongod when running with --shardsvr command-line option or the shardsvr value for the clusterRole setting in a configuration file.--shardsvr命令行选项运行mongod时的默认端口,或配置文件中clusterRole设置的shardsvr值。
|
27019 | mongod when running with --configsvr command-line option or the configsvr value for the clusterRole setting in a configuration file.--configsvr命令行选项运行mongod时的默认端口,或配置文件中clusterRole设置的configsvr值。
|