日期:2014-05-16 浏览次数:20497 次
C:\> mkdir \data C:\> mkdir \data\db
C:\> cd \mongo\bin C:\mongo\bin> mongod
C:\> cd \mongo\bin
C:\mongo\bin> mongo
> // the mongo shell is a javascript shell connected to the db
> // by default it connects to database 'test' at localhost
> 3+3
6
> db
test
> // the first write will create the db:
> db.foo.insert( { a : 1 } )
> db.foo.find()
{ _id : ..., a : 1 }
> show dbs
...
> show collections
...
> help