mongodb使用总结1
?
?
安装mongodb
$ # replace "1.6.4" in the url below with the version you want
$ curl http://downloads.mongodb.org/linux/mongodb-linux-x86_64-1.6.4.tgz > mongo.tgz
$ tar xzf mongo.tgz
$ cd mongo
$./mongod ?#启动服务器
$./mongo #启动客户端
?
?
?
?
?
1.mongodb 命令列表
? Mongo查询语法与SQL语法对照表
?
> show dbs
admin ? (empty)
local ? (empty)
test ? ?0.203125GB
> show collections
mycoll
system.indexes
testCollection
users
>?
?
?
{ "_id" : { "$oid" : "4de72c04a1f3a9ef7fc0c750"} , "name" : "MongoDB" , "type" : "database" , "count" : 1 , "info" : { "x" : 203 , "y" : 102}}