Installation
|
verify the installationmongod -h# some useful switches--port arg # mongo's port number,default is 27017--dbpath arg # mongo's database path,default is /etc/db
Use a custom dbpath
|
Start the mongodb
|
Some Basic commands
Enter mongodb’s shell mode in Terminal:mongo
show databases(show dbs)
use
Switch to the specified database.
db.dropDatabase()
Drop current active database
showcollections
Show table collections in current active database.
For more details on mongodb commands, enter help
command in the shell mode.