Failed global initialization:FileNotOpen: Failed to open "C:\MongoDB\data\log\mongo.log" 安装MongoDB时卡死
在安装MongoDB的时候,下载了3.6版本,安装过程中发现到一半就卡死了,后面换了一个较低版本的才安装成功
这里是所有MongoDB版本的下载地址:
https://www.mongodb.org/dl/win32/x86_64-2008plus-ssl?_ga=2.115265476.272239361.1515997841-1827559456.1515997841
下载后安装,一路next安装完成,next、custom,改变安装位置。


把MongoDB安装在C盘目录下,安装完成后,创建数据库文件(自己创建data和db文件夹)的存放位置,比如
C:\MongoDB\data\db
然后打开终端,来到bin目录下,输入
mongod --dbpath C:\MongoDB\data\db

打开 http://127.0.0.1:27017/ ,发现如下提示:
It looks like you are trying to access MongoDB over HTTP on the native driver port.
将MongoDB服务器作为Windows服务运行
重新打开一个cmd终端(一定要管理员身份C:\Windows\System32\cmd.exe,右键以管理员身份运行,这个超级重要),继续来到并目录下,输入
mongod --dbpath "C:\MongoDB\data\db" --logpath "C:\MongoDB\data\log\mongo.log" --install --serviceName "MongoDB"
输入上述命令之后出现了一些错误
Failed global initialization:FileNotOpen: Failed to open "C:\MongoDB\data\log\mongo.log"
研究后发现是没有创建这些文件,手动创建这些文件后重新打开cmd命令行,进入到bin里面,继续输入上面命令即可。
开启服务
接下来用命令net start mongodb 用来开启服务
打开任务管理器,服务,找到MongoDB,发现MongoDB正在运行。
好了,填坑就到这里,下面继续学习吧。
Failed global initialization:FileNotOpen: Failed to open "C:\MongoDB\data\log\mongo.log" 安装MongoDB时卡死的更多相关文章
- org.springframework.beans.factory.BeanCreationException,Invocation of init method failed,Context initialization failed
G:\javaanzhuang\apache-tomcat-\bin\catalina.bat run [-- ::,] Artifact ssm_qingmu02_web:war exploded: ...
- 单点登录(十)-----遇到问题-----cas启用mongodb验证方式报错com.mongodb.CommandFailureException---Authentication failed
cas启用mongodb验证方式报错com.mongodb.CommandFailureException---Authentication failed. 完整报错信息: 二月 08, 2017 5 ...
- log4j:ERROR Failed to rename [/log/xxx.log] to [/log/xxx.log.2016-11-23.log]
Log4j报错: log4j:ERROR Failed to rename [/log/xxx.log] to [/log/xxx.log.2016-11-23.log] google了一下发现是个b ...
- Maven-008-Nexus 私服部署发布报错 Failed to deploy artifacts: Failed to transfer file: ... Return code is: 4XX, ReasonPhrase: ... 解决方案
我在部署构件至 maven nexus 私服时,有时会出现 Failed to deploy artifacts: Failed to transfer file: ... Return code i ...
- postman Installation has failed: There was an error while installing the application. Check the setup log for more information and contact the author
Error msg: Installation has failed: There was an error while installing the application. Check the s ...
- FTP:500 OOPS: failed to open vsftpd log file:/var/log/vsftpd.log
如下:从10.12.8.165 FTP 到 10.1.3.34,报failed to open vsftpd log[a4_csbdc@localhost ~]$ ftp 10.1.3.34Conn ...
- centos 7 系统启动不了 出现报错dependency failed for /mnt , dependency failed for local file systems
阿里云一台Ecs重启后启动不了,出现报错 dependency failed for /mnt , dependency failed for local file systems , 报错的原因 ...
- 运行Virtualbox去安装系统时出错:Failed to open a session for the virtual machine,Unable to load R3 module xxxx/VBoxDD.DLL(VBoxDD)
貌似看到不少人(1,2,3),在使用Virtualbox去安装系统时,都遇到这个错误: 比如这里遇到的: 截图: 和另外这里的截图: 加文字描述: Failed to open a session f ...
- maven打包出错: Failed to clean project: Failed to delete
maven打包出错: Failed to clean project: Failed to delete 出现这种错误,通常是由于您已启动了另一个tomcat 进程,导致报错,关闭tomcat进程即可 ...
随机推荐
- codeforces 786E ALT
题目链接:CF786E 输出方案暗示网络流 我们考虑最朴素的建图 由源点\(s\)连向所有人,容量为1:树上所有的边视作节点连向\(t\),流量为1:人向其路径上所有的树边连边,流量为\(inf\), ...
- mongoDB 小练习
1 创建数据库名为 grade > use grade switched to db grade 2 创建集合 class 3 插入若干数据 格式如下{name:xxx,age:xxx,sex: ...
- 深入理解PHP的运行模式
PHP运行模式有4钟:1)cgi 通用网关接口(Common Gateway Interface))2) fast-cgi 常驻 (long-live) 型的 CGI3) cli 命令行运行 ( ...
- Linux基本命令总结(五)
接上篇: 21,在lunix系统里,文件或目录的权限的掌控以拥有者及所诉群组来管理.可以使用chgrp指令取变更文件与目录所属群组,这种方式采用群组名称或群组识别码都可以.Chgrp命令就是chang ...
- CMDB资产管理系统开发【day25】:windows客户端开发
1.目录结构 PS Y:\MadkingClient> tree /f 卷 netgame 的文件夹 PATH 列表 卷序列号为 ACE3-896E Y:. ├─bin │ NedStark.p ...
- C#获取根目录的方法总结
1.控制台应用程序 static void Main(string[] args) { //1.Environment.CurrentDirectory Console.WriteLine(Envir ...
- JavaScript类型判断详解(Object.prototype.toString.call()方法进行数据类型的可靠判断)
前言 在编写一些类库中,我们经常需要判断一些未知的用户的输入和配置,故而需要进行一系列的类型判断.故而总结下JS是如何进行类型判断的 typeof typeof操作符返回一个字符串,表示未经计算的操作 ...
- Java之final关键字详解
1. 修饰类 当用final去修饰一个类的时候,表示这个类不能被继承. 注意: a. 被final修饰的类,final类中的成员变量可以根据自己的实际需要设计为fianl. b. final类中的成员 ...
- HttpReponse
属性: django将请求报文中的请求行.头部信息.内容主体封装成 HttpRequest 类中的属性. 除了特殊说明的之外,其他均为只读的. 0.HttpRequest.scheme 表示请 ...
- django中的反向解析
1,定义: 随着功能的增加会出现更多的视图,可能之前配置的正则表达式不够准确,于是就要修改正则表达式,但是正则表达式一旦修改了,之前所有对应的超链接都要修改,真是一件麻烦的事情,而且可能还会漏掉一些超 ...