mongodb4 安装 连接

首先到官网下载版本,windows 或 linux,centos 选择 rhel 系统

https://www.mongodb.com/download-center#community

安装(根据自己情况安装、data、log目录默认即可)

在这里插入图片描述
在这里插入图片描述

启动mongod服务,在data目录下创建db目录,win+r打开cmd

d:
cd D:\program\mongodb\bin
mongod --dbpath D:\program\mongodb\data\db

连接 mongodb

d:
cd D:\program\mongodb\bin
mongo.exe

猜你喜欢

转载自blog.csdn.net/m0_37202351/article/details/86769088
今日推荐