下载好后点击安装
因为每次启动Mongodb都要指定数据库,就是和bin目录同级的那个data文件夹, 所以接下来我们直接在环境变量中配置Mongodb
填写内容:
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: F:\Mongodb\data\db
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: F:\Mongodb\log\mongod.log
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1
#processManagement:
#security:
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:
mp:
命令:
mongod --dbpath “F:\Mongodb\data” --logpath “F:\Mongodb\log\MongoDB.log” --install --serviceName “MongoDB”
命令:net start MongoDB
命令:sc delete MongoDB
如果遇见其他情况请看:https://blog.csdn.net/weixin_44064357/article/details/105323762