首页 > 数据库技术 > 详细

MongoDB随笔

时间:2017-04-24 20:43:33      阅读:245      评论:0      收藏:0      [点我收藏+]
创建用户
db.createUser({user: "abc",pwd: "abc123",roles: [ { role: "readWrite", db: "test" } ]});
db.system.users.remove({user:"abc"})
 
MongoDB导出数据
mongoexport -d service -c speech -o file --type csv -f id,time
mongoexport -d service -c speech -o file --type json -f id,time
 
mongoexport -d service -c speech -o file.json --type json -f id,time -q ‘{"time": {$gt:1483200000000}}‘ #大于等于2017年
mongoexport -d service -c speech -o file.csv --type csv -f id,time -q ‘{"time": {$gt:1483200000000}}‘ #大于等于2017年
 
待续。。。

MongoDB随笔

原文:http://www.cnblogs.com/zhzhang/p/6758846.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!