Surprised that I did not find a duplicate of this. Ok, now we have the content.
From the command line, simply do the following:
$ mongo myDatabase
, . , <db address> .
, :
$ mongo --help
MongoDB shell version: 2.4.9
usage: 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
, .
, , , .mongorc.js:
db=db.getSiblingDB("myDatabase")
db :
db.collection.find()
myDatabase.