From mongo shell run db.currentOp() to show all active connections or db.currentOp(true) to show all connections. From: https://stackoverflow.com/questions/9945107/is-there-anyway-to-discover-which-ip-addresses-are-connected-to-the-db
1.基本操作db.AddUser(username,password) 添加用户db.auth(usrename,password) 设置数据库连接验证db.cloneDataBase(fromhost) 从目标服务器克隆一个数据库db.commandHelp(name) returns the help for the commanddb.copyDatabase(fromdb,todb,fromhost) 复制数据库fromdb---源数据库名称,todb---目标数据库名称,fromh
inert into users value(3,5) db.users.insert({a:3,b:5}) select a,b from users db.users.find({}, {a:1,b:1}) select * from users db.users.find() select * from users where age=33 db.users.find({age:33}) select a,b from users where age=33 db.users.fin