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 命令行选项或配置文件中clusterRole 设置的shardsvr 值运行mongod 时的默认端口。 |
27019 | mongod when running with --configsvr command-line option or the configsvr value for the clusterRole setting in a configuration file.--configsvr 命令行选项或配置文件中clusterRole 设置的configsvr 值运行时,mongod 的默认端口。 |
27020 | mongocryptd listens for messages. mongocryptd 监听消息的默认端口。mongocryptd is installed with MongoDB Enterprise Server and supports automatic encryption operations.mongocryptd 与MongoDB Enterprise Server一起安装,支持自动加密操作。 |