该实战过程完全跟着官网一步一步实现 ,官网教程:https://docs.mongodb.com/manual/tutorial/atlas-free-tier-setup/

  使用Mongo Shell连接Cluster :

  1. 官网登录,创建免费集群 (补:只能免费一个月,而且有各种限制) ,点击 Build  a New Cluster  按钮,下面是我成功创建Cluster的图。

  2. 设置Mongodb User , 和 IP 白名单,注意IP白名单不是自己网络IP。了解: https://www.imooc.com/qadetail/249703?lastmedia=1

  3. 点击Connect
  4. 选择连接方法,下载对应的连接客户端,此处选择Shell

  5. 下载对应的客户端
  6. 设置环境变量至bin文件夹,不设也ok,但是到时运行程序要在对应路径下运行。
  7. copy 下载命令

  8. 打开cmd窗口 , 连接


    连接成功~ 至于警告,问了问客服回答如下:

    Hi bibi thank you for getting in touch and sending the screenshot.
    The messages displayed in the screenshot can be treated a warnings.
    The warning message that says 'shell and versions do not match' is displayed as you appear to have downloaded version 4.0 of MongoDB (you can see this at the top of the screenshot) and version 3.6.6 of MongoDB Atlas. Rest assured that this is just a notification and version 4.0 of MongoDB and version 3.6.6 of MongoDB Atlas are compatible.
    The message 'user is  not allowed to do action [getlog] on [admin]' appears when you have a free tier (M0) Instance of MongoDB Atlas. The free tier (M0), M2 and M5 Instances have some limitations and command limitations, including limited metrics for analysis. In spite of receiving this message, you should still be able to perform MongoDB CRUD Operations in the shell.
    For example, you can list your database there by entering;
    show dbs
    and create a new database, called test, by entering;
    use test
    You may also find the following MongoDB Atlas article helpful;

    客服态度超级棒!

  9. 操作数据库
    例如:
    MongoDB Enterprise Cluster0-shard-0:PRIMARY> use myNewDB
    switched to db myNewDB
    MongoDB Enterprise Cluster0-shard-0:PRIMARY> db.myNewCollection1.insertOne({x:1})
    {
    "acknowledged" : true,
    "insertedId" : ObjectId("5b63d28b15b047a6f9a9d004")
    }
    MongoDB Enterprise Cluster0-shard-0:PRIMARY>

    后台看看集合变化

Mongodb 集群实战的更多相关文章

  1. 高可用的MongoDB集群-实战篇

    1.概述 最近有同学和网友私信我,问我MongoDB方面的问题:这里我整理一篇博客来赘述下MongoDB供大家学习参考,博客的目录内容如下: 基本操作 CRUD MapReduce 本篇文章是基于Mo ...

  2. 【转载】MongoDB集群和实战详解

    1.概述 最近有同学和网友私信我,问我MongoDB方面的问题:这里我整理一篇博客来赘述下MongoDB供大家学习参考,博客的目录内容如下: 基本操作 CRUD MapReduce 本篇文章是基于Mo ...

  3. 搭建高可用mongodb集群(四)—— 分片(经典)

    转自:http://www.lanceyan.com/tech/arch/mongodb_shard1.html 按照上一节中<搭建高可用mongodb集群(三)-- 深入副本集>搭建后还 ...

  4. [转]搭建高可用mongodb集群(四)—— 分片

    按照上一节中<搭建高可用mongodb集群(三)—— 深入副本集>搭建后还有两个问题没有解决: 从节点每个上面的数据都是对数据库全量拷贝,从节点压力会不会过大? 数据压力大到机器支撑不了的 ...

  5. 搭建高可用mongodb集群(四)—— 分片

    按照上一节中<搭建高可用mongodb集群(三)—— 深入副本集>搭建后还有两个问题没有解决: 从节点每个上面的数据都是对数据库全量拷贝,从节点压力会不会过大? 数据压力大到机器支撑不了的 ...

  6. 搭建高可用mongodb集群(一)——配置mongodb

    在大数据的时代,传统的关系型数据库要能更高的服务必须要解决高并发读写.海量数据高效存储.高可扩展性和高可用性这些难题.不过就是因为这些问题Nosql诞生了. NOSQL有这些优势: 大数据量,可以通过 ...

  7. 搭建高可用mongodb集群(四)—— 分片

    按照上一节中<搭建高可用mongodb集群(三)-- 深入副本集>搭建后还有两个问题没有解决: 从节点每个上面的数据都是对数据库全量拷贝,从节点压力会不会过大? 数据压力大到机器支撑不了的 ...

  8. 搭建高可用mongodb集群—— 分片

    从节点每个上面的数据都是对数据库全量拷贝,从节点压力会不会过大? 数据压力大到机器支撑不了的时候能否做到自动扩展? 在系统早期,数据量还小的时候不会引起太大的问题,但是随着数据量持续增多,后续迟早会出 ...

  9. 搭建高可用mongodb集群(一)——配置mongodb

    在大数据的时代,传统的关系型数据库要能更高的服务必须要解决高并发读写.海量数据高效存储.高可扩展性和高可用性这些难题.不过就是因为这些问题Nosql诞生了. NOSQL有这些优势: 大数据量,可以通过 ...

随机推荐

  1. springsecurity 源码解读之 SecurityContext

    在springsecurity 中,我们一般可以通过代码: SecurityContext securityContext = SecurityContextHolder.getContext(); ...

  2. noip第15课资料

  3. 搭建docker环境准备

    Docker平台的基本构成

  4. 【微服务】.netCore eShopOnContainers 部署实践《二》

    Docker 专业术语介绍 优点:轻量级.可伸缩(灵活性).可靠性.可移植  Container image A package with all of the dependencies and in ...

  5. Linux下解压.tar.xz格式文件的方法

    前言 对于xz这个压缩相信很多人陌生,但xz是绝大数linux默认就带的一个压缩工具,xz格式比7z还要小. 今天在下载Node.js源码包的时候遇到的这种压缩格式.查了一下资料,这里进行一下记录,分 ...

  6. java调用高德地图api实现通过ip定位访问者的城市

    所需东西:高德地图的key 注意:这个key是 web服务的key  和js的key不是一个key(若没有则自行创建,创建教程在文末) 高德地图的api文档:https://lbs.amap.com/ ...

  7. 高效的 JavaScript

    避免使用 eval 或 Function 构造器 改写 eval 如果你需要函数,使用 function 不要使用 with 不要在要求性能的函数中使用 try-catch-finally 隔离 ev ...

  8. RabbitMQ常见错误2

    java.io.IOException at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:105) at com.rabbitmq ...

  9. javascript的hashCode实现

    hashCode = function(str){ var hash = 0; if (str.length == 0) return hash; for (i = 0; i < str.len ...

  10. Linux编程 8 (挂载mount,查看磁盘df du,搜索grep,压缩zgip,归档tar)

    一. 挂载存储媒体 linux文件系统将所有的磁盘都并入一个虚拟目录下,当使用新的存储媒体之前,需要把它放到虚拟目录下,这项工作称为挂载(mounting) 1.1 mount 命令 在linux上用 ...