admin管理员组

文章数量:1613413

Commands

vandy@vandy:~$ cd mongo/bin
vandy@vandy:~/mongo/bin$ sudo ./mongod --dbpath data/db
vandy@vandy:~/mongo/bin$ ./mongo
> show dbs
local   (empty)
product 0.203125GB
pytest  0.203125GB
test    0.203125GB
> use pytest
> show collections
system.indexes
test
> db.test.find()

#Delete all records
> db.foo.remove()

Exit from MongoDB

In server

ctrl+shift+c

In shell

$ ./mongo
> use admin
> db.shutdownServer()

Killall command

sudo killall -9 mongod(may damage, not suggested)
sudo killall -15 mongod(suggested)

本文标签: fundamentalMongoDBcommandscontrol