Robomongo无法查看Collections内容

作者: 全栈开发之道 | 来源:发表于2018-02-23 17:58 被阅读72次

背景

之前,使用2.x版本的MongoDB时,选择了Robomongo可视化管理工具,一切都是挺美好的,无论是在windows上还是Mac系统,用着都很方便。最近把MongoDB 版本升级到 v3.4.0,发现了一个问题:Robomongo无法查看MongoDB 3.x的Collections内容了, 原因何在呢?

查看 mongodb版本的方法:

在终端窗口,输入以下指令,即可得到当前使用的 mongodb 的版本号。

mongo -version

mongodb 版本

使用Robomongo连接数据库

首先,需要另起一个终端窗口,使用 mongod 指令启动 mongoDB。 正常情况下。以 mac 系统为例:

sudo mongod

2018-02-24T01:02:03.001+0800 I CONTROL  [initandlisten] MongoDB starting : pid=1224 port=27017 dbpath=/data/db 64-bit host=leopardmac.local
2018-02-24T01:02:03.001+0800 I CONTROL  [initandlisten] db version v3.4.0
2018-02-24T01:02:03.001+0800 I CONTROL  [initandlisten] git version: f4240c60f005be757399042dc12f6addbc3170c1
2018-02-24T01:02:03.001+0800 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2m  2 Nov 2017
2018-02-24T01:02:03.001+0800 I CONTROL  [initandlisten] allocator: system
2018-02-24T01:02:03.001+0800 I CONTROL  [initandlisten] modules: none
2018-02-24T01:02:03.001+0800 I CONTROL  [initandlisten] build environment:
2018-02-24T01:02:03.001+0800 I CONTROL  [initandlisten]     distarch: x86_64
2018-02-24T01:02:03.001+0800 I CONTROL  [initandlisten]     target_arch: x86_64
2018-02-24T01:02:03.001+0800 I CONTROL  [initandlisten] options: {}
2018-02-24T01:02:03.002+0800 I -        [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-02-24T01:02:03.002+0800 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=7680M,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2018-02-24T01:02:03.798+0800 I CONTROL  [initandlisten] 
2018-02-24T01:02:03.798+0800 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-02-24T01:02:03.798+0800 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2018-02-24T01:02:03.798+0800 I CONTROL  [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2018-02-24T01:02:03.798+0800 I CONTROL  [initandlisten] 
2018-02-24T01:02:03.798+0800 I CONTROL  [initandlisten] 
2018-02-24T01:02:03.798+0800 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2018-02-24T01:02:03.850+0800 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2018-02-24T01:02:03.851+0800 I NETWORK  [thread1] waiting for connections on port 27017
启动 Robomongo连接后,发现无法查看Collections目录下面的内容或者是创建新的Collection也无法查看。

查询了才发现mongodb 3.x是运行在 wiredTiger 引擎,而Robomongo目前的版本只支持 MMAPv1 引擎,所以Robomongo对mongodb 3.x并不支持。所以,我们只能换一个可视化工具了,网上推荐用MongoChef

下载地址是:http://3t.io/

安装完毕后,发现使用方法其实跟Robomongo也很相近,可以正常查看数据库的内容:


image.png

小结

从对mongodb的操作方式来看, Studio 3T 与 Robomongo 是类似的。


参考书: 《 全栈开发之道:MongoDB+Express+AngularJS+Node.js


更多全栈技术,请关注微信公众号: “全栈工程师的早读课”,每天早8:00 准时推送技术文章。

相关文章

  • Robomongo无法查看Collections内容

    背景 之前,使用2.x版本的MongoDB时,选择了Robomongo可视化管理工具,一切都是挺美好的,无论是在w...

  • MongoDB入门

    下载安装mongoDB 客户端:第一开始下载mongoUVE,发现无法查看collections里的内容,查了一下...

  • 此内容违规,无法查看

    吃饭的时候 在朋友圈 看到一篇很好的文章 饭后想仔细阅读 打不开了 显示 “此内容因违规无法查看” 他奶奶的 语句...

  • Mongodb 基本操作

    show dbs : 查看数据库列表 show collections / show tables : 查看集...

  • 此内容因违规无法查看

    一 我曾经在字典和百度上查过“猥亵”两个字的意思。 每一次都让我想起5岁的那个晚上。 即使已经过去了二十年。 我记...

  • 只内容因违规无法查看

  • MongoDB可视化工具选择之RoBo 3T

    官网:https://robomongo.org/download[https://robomongo.org/d...

  • mongodb

    show dbs 查看有哪些数据库show collections 查看在当前数据库有哪些集合db 查看当前...

  • 你看了几个内容违规无法查看

    这是个来了挂的世界 从蠢货王尼玛其人、我曾住404、多图搬离城中村的异乡租客等文章不再了,有的是被删,有的是自己删...

  • 传染

    对不起,此内容因违规无法查看! 甲:内容违规无法查看,前面是没有“对不起”这个词语的。 乙:看来我还是再一次礼貌了...

网友评论

    本文标题:Robomongo无法查看Collections内容

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