用管理员身份运行CMD
> cd C:\Program Files\mongodb\bin
> C:\Program Files\mongodb\bin>mongod --dbpath "C:\Program Files\mongodb\data\db" --logpath "C:\Program Files\mongodb\data\log\MongoDB.log" --install --serviceName "MongoDB"
2022-05-14 11:36:34
用管理员身份运行CMD
> cd C:\Program Files\mongodb\bin
> C:\Program Files\mongodb\bin>mongod --dbpath "C:\Program Files\mongodb\data\db" --logpath "C:\Program Files\mongodb\data\log\MongoDB.log" --install --serviceName "MongoDB"