修改MongoDb的 DB 和 Log 存储路径 (Windows)-摘自网络
Create a file called mongod.cfg in MongoDB folder if you dont have it. In my case: C:\Users\ivanbtrujillo\MongoDB
Then, edit mongod.cfg with notepad and add a line with the following (our custom dbpath):
dbpath=C:\Users\ivanbtrujillo\MongoDB\data\db
In this file you should especify the logpath too. My mongod.cfg file is:
logpath=C:\Users\ivanbtrujillo\MongoDB\log\mongo.log
dbpath=C:\Users\ivanbtrujillo\MongoDB\data\db
If you uses mongoDB as a windows service, you have to change this key and especify the mongod.cfg file.
To install mongodb as a windows service run this command:
**"C:\Users\ivanbtrujillo\MongoDB\bin\mongod.exe" --config "C:\Users\ivanbtrujillo\MongoDB\mongod.cfg" –install**
Open regedit.exe and go to the following route:
HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\services\MongoDB
MongoDB service does not work, we have to edit the ImagePath key, delete its content and put the following:
**"C:\Users\ivanbtrujillo\MongoDB\bin\mongod.exe" --config "C:\Users\ivanbtrujillo\MongoDB\mongod.cfg"
--logpath="C:\Users\ivanbtrujillo\MongoDB\log\mongo.log" –service**
We indicates to mongo it's config file and its logpath.
Then when you init the mongodb service, it works.
Here is a full tutorial to install mongoDB in windows:http://ivanbtrujillo.herokuapp.com/2014/07/24/installing-mongodb-as-a-service-windows/
相关文章
- (二十三)mongodb中group的问题
- 【Mongodb】如何创建mongodb的replica set
- logstash-out-mongodb实现elasticsearch到Mongodb的数据同步
- MongoDB数据库
- mongodb的基本操作-小结
- [Node] Define MongoDB Model with Mongoose
- Python中MongoDB使用
- 安装 php_mongodb.dll的坑
- Install MongoDB Community Edition on Windows
- Install MongoDB Community Edition on Windows
- 【转】windows下mongodb安装与使用整理
- 慕课网前端项目:Vue2.0+Node.js+MongoDB全栈打造商城系统 笔记 整理【4/18】
- 〖Python 数据库开发实战 - MongoDB篇③〗- Windows环境下的MongoDB数据库安装
- windows server 2008 安装Microsoft ActiveSync 6.1提示缺少一个Windows Mobile设备中心所须要的Windows组件
- MongoDB一键式安装工具
- WINDOWS.H already included. MFC apps must not #include <Windows.h>
- 【错误记录】Windows 控制台程序编译报错 ( WINDOWS.H already included. MFC apps must not #include <Windows.h> )
- MongoDB(一)
- 【MongoDB】The Access control of mongodb
- 【MongoDB】在windows平台mongodb切片集群(三)
- Redis、Memcache和MongoDB的区别
- mongodb数据文件结构——record是内嵌BSON的双向链表,多个record或索引组成extent
- mongodb分片介绍—— 基于范围(数值型)的分片 或者 基于哈希的分片
- NoSQL生态系统——类似Bigtable列存储,或者Dynamo的key存储(kv存储如BDB,结构化存储如redis,文档存储如mongoDB)
- mongodb系列(一)mongoose find普通查询与aggregate聚合查询的 简单性能对比
- Windows安装WSL进行机器学习(windows和Ubuntu同时使用)