mongodb命令集合
来源:互联网 发布:yy头像psd源码免费下载 编辑:程序博客网 时间:2024/05/21 00:15
db.AddUser(username,password)
db.auth(usrename,password)
db.cloneDataBase(fromhost)
db.commandHelp(name)
db.copyDatabase(fromdb,todb,fromhost)
db.createCollection(name,{size:3333,capped:333,max:88888})
db.currentOp()
db.dropDataBase()
db.eval_r(func,args)
db.getCollection(cname)
db.getCollenctionNames()
db.getLastError()
db.getLastErrorObj()
db.getMongo()
db.getMondo().setSlaveOk()
db.getName()
db.getPrevError()
db.getProfilingLevel()
db.getReplicationInfo()
db.getSisterDB(name)
db.killOp()
db.printCollectionStats()
db.printReplicationInfo()
db.printSlaveReplicationInf
db.printShardingStatus()
db.removeUser(username)
db.repairDatabase()
db.resetError()
db.runCommand(cmdObj)
db.setProfilingLevel(level)
db.shutdownServer()