随笔分类 -  Mongodb

摘要:git clonehttps://github.com/mongodb/mongo-c-driver.gitcd mongo-c-drivergit checkout secondarymake && make installgit clonehttps://github.com/collectd/collectd.gitcd collectd修改Collectd得文件src/curl.cif (wp->response_time)start = cdtime ();+ else+ start = cdtime ();src/write_mongodb.c- status 阅读全文
posted @ 2013-06-09 18:03 willier 阅读(768) 评论(0) 推荐(0)
摘要:开启用户验证下的gridfs 连接使用,在执行脚本前可以在python shell中from pymongo import Connectionfrom gridfs import *con = Connection("mongodb://admin:admin@127.0.0.1:27017")#用URI的方式建立数据库的链接,当然也有其他的方式进行授权,现在是mongodb的管理员帐号,普通帐号不知道为什么不可以,db = con['repository']#连接到具体的数据库fs = gridfs.GridFS(db, 'images' 阅读全文
posted @ 2012-12-03 14:25 willier 阅读(313) 评论(1) 推荐(0)