利用mongodb自带的mongo客户端来连接
先把mongo的二进制文件复制到你所需要的二进制目录下
$ cd www/node/message/data/
$ cp /usr/bin/mongo/bin/mongo ./bin/
显示mongo的帮助信息
$ ./bin/mongo --help
MongoDB shell version: 3.2.6
usage: ./bin/mongo [options] [db address] [file names (ending in .js)]
db address can be:
foo foo database on local machine
192.169.0.5/foo foo database on 192.168.0.5 machine
192.169.0.5:9999/foo foo database on 192.168.0.5 machine on port 9999
Options:
--shell run the shell after executing files
--nodb don't connect to mongod on startup - no
'db address' arg expected
--norc will not run the ".mongorc.js" file on
start up
--quiet be less chatty
--port arg port to connect to
--host arg ser