免费的 MongoDB 云数据库 (MongoDB Atlas)使用教程
2024-4-7
| 2024-4-7
0  |  阅读时长 0 分钟
Created time
Apr 7, 2024 02:57 PM
date
status
category
Origin
summary
tags
type
URL
icon
password
slug

简介

众所周知,MongoDB 包括社区版和企业版,但不止如此,MongoDB 公司还有 MongoDB Atlas:Database as a Service.
MongoDB Atlas 提供的是云端的数据库服务,大家都知道,使用数据库很简单,但数据库的运维很麻烦:部署、容灾、备份、监控。云数据库使得开发者只需关注业务本身的开发。

注册和登录

在 MongoDB atlas 首页,如果有账号,那就点击登陆。否则点击 Get Started here 来注册,注册页面都是必填项:
notion image
notion image
notion image

创建新 Project

成功登录后,创建一个项目
notion image
notion image
为项目分配成员
notion image

创建新的 Cluster

创建一个新的集群
notion image
选择免费套餐,共享内存 CPU,512M 存储。
notion image
选择集群部署的位置,选一个亚洲节点好了。
notion image
成功选择,稍微等待一段时间进行初始化操作:
notion image

创建用户

notion image
notion image

设置访问白名单

notion image
notion image

连接试用 Cluster

MongoDB Atlas 链接的方式支持三种:
  1. 基于 MongoDB shell 命令行方式链接
  1. 基于 代码的方式链接
  1. 基于 图形化的 MongoDB compass 链接
notion image
notion image

MongoDB shell 命令行

notion image
notion image
成功链接后,输入相关 MongoDB 相关命令即可操作数据库
notion image

基于 代码的方式

notion image
创建项目
新增数据
查询数据

基于 图形化的 MongoDB compass

notion image
notion image
notion image
notion image
notion image
notion image
notion image

集合的管理

notion image
notion image

数据库的备份与还原

notion image
notion image
> 本文由简悦 SimpRead 转码:https://juejin.cn/post/6844904020385988622
Contexthelper优化contexthelper最后优化
Loading...