选择custom
选择要存放的地址
将此选项勾掉 否则会下载MongoDBCompass很慢会卡掉
新建一个批处理文件将此文件放在start.bat(新建txt文档然后写入mongod --dbpath ./data) ./data就是在此目录下创建一个data
D:\ProgramFiles\MongoDB\bin>mongod --bind_ip 0.0.0.0 --logpath D:\ProgramFiles\M
ongoDB\datas\logs\mongo.log --logappend --dbpath D:\ProgramFiles\MongoDB\datas\d
b --port 27017 --serviceName "MongoDB" --serviceDisplayName "MongoDB" --install