通过批处理脚本启动MongoDB 服务

解压包路径:D:\Tools\mongodb-win32-x86_64-enterprise-windows-64-4.2.1

@echo off
title MongoDB-server
set ENV_HOME="D:\Tools\mongodb-win32-x86_64-enterprise-windows-64-4.2.1"
D:
color 0a
cd %ENV_HOME%
bin\mongod.exe --dbpath=data\db
exit

使用脚本,免去每次都去命令行手动写命令启动的麻烦。

Guess you like

Origin blog.csdn.net/JavaAlpha/article/details/103636251