1、下载安装
2、新建存储目录D:\mongodbdata\db
3、来到bin目录下执行
C:\Program Files\MongoDB\Server\4.2\bin>mongo.exe --dbpath D:\mongodbdata\db
进去mongo
1、运行
C:\Program Files\MongoDB\Server\4.2\bin>mongo
net stop MongoDB
net start MongoDB
db.blogg.insert({'id':1,'title':'MyBlog'})
db.blogg.findOne()