没有一个可视化工具还是不太方便……所以安装一个
Robo 3T 官方下载链接
下载好的tar.gz文件
tar -xzf robo3t-1.1.1-linux-x86_64-c93c6b0.tar.gz
cd robo3t-1.1.1-linux-x86_64-c93c6b0/bin
./robo3t
点击create ,默认链接,save
然后connect
testdb是已经创建的数据库,见同类别中在自己的C++工程链接MongoDB 数据库并插入文档 博客
testcollection是这个testdb数据库中的collection(我暂时理解为表)
其中有8条记录(暂时理解为记录,其实应该是对象吧)。
如果出现以下问题
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Available platform plugins are: xcb.
Reinstalling the application may fix this problem.
Aborted (core dumped)
解决方法
mkdir ~/robo-backup
mv robo3t-1.1.1-linux-x86_64-c93c6b0/lib/libstdc++* ~/robo-backup/
robo3t-1.1.1-linux-x86_64-c93c6b0/bin/robo3t
~/指 /root