【问题标题】:Can not access MongoDB data after upgrade from 4.0 to 4.2从 4.0 升级到 4.2 后无法访问 MongoDB 数据
【发布时间】:2019-09-11 14:11:12
【问题描述】:

我已经安装了 mongodb-community,将其作为服务启动。

在此过程中,我覆盖了 /usr/local/bin 中的符号链接,现在它们指向 ../Cellar/mongodb-community/4.2.0/bin

在这个符号链接指向../Cellar/mongodb/4.0.3/bin之前,这个文件夹仍然存在。

如何使用之前 mongo 版本中的所有 mongodb 数据(数据库、用户等)?

我目前可以通过 Robo3T 连接到 localhost,但无法获取数据库列表。

【问题讨论】:

    标签: mongodb robo3t


    【解决方案1】:

    将 mongodb 从 4 或更低版本更新到 4.2 的最佳方法是

    a) create dump of all data;
    b) uninstall completely current mongodb;
    c) install mongodb 4.2 (community edition);
    d) delete all mongodata in order to restore them from dump later;
    e) restore data from dump;
    g) run mongo service;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-06
      • 1970-01-01
      • 1970-01-01
      • 2018-09-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多