啓動mongodb服務端
mongod --dbpath="[directory of db data]" --smallfiles
操作
//select db
use [dbname]
//show databaes
show dbs
//show collections(table)
show collections
// query data
db.[collectonsname].find([query param])
mongod --dbpath="[directory of db data]" --smallfiles
//select db
use [dbname]
//show databaes
show dbs
//show collections(table)
show collections
// query data
db.[collectonsname].find([query param])