美文网首页Other
[DB] MacOS 本地安装 MongoDB

[DB] MacOS 本地安装 MongoDB

作者: 何幻 | 来源:发表于2022-08-20 14:30 被阅读0次

官网下载

本地解压

下载完成后,是一个 .tgz 文件:mongodb-macos-x86_64-6.0.1.tgz
解压后的目录结构如下,

├── LICENSE-Community.txt
├── MPL-2
├── README
├── THIRD-PARTY-NOTICES
└── bin
   ├── install_compass
   ├── mongod
   └── mongos

启动 MongoDB

# 确保目录存在
$ mkdir /Users/thzt/mongodb && mkdir /Users/thzt/mongodb/db

# 启动
$ ./mongod --dbpath /Users/thzt/mongodb/db

启动后可以在 浏览器中访问

http://localhost:27017/
> It looks like you are trying to access MongoDB over HTTP on the native driver port.

使用 Navicat Premium 连接

相关文章

网友评论

    本文标题:[DB] MacOS 本地安装 MongoDB

    本文链接:https://www.haomeiwen.com/subject/yjzpgrtx.html