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进程即可 ...
随机推荐
- mpvue——引入echarts图表
安装 mpvue-echarts的github地址 https://github.com/F-loat/mpvue-echarts $ cnpm install mpvue-echarts $ cnp ...
- pymongo 操作
python 操作 mongoDB 模块 pymongo 安装方法 sudo pip3 install pymongo 操作步骤 1. 创建数据库连接对象 conn = pymonge.MomgoCl ...
- java 11 完全支持Linux容器(包括Docker)
许多运行在Java虚拟机中的应用程序(包括Apache Spark和Kafka等数据服务以及传统的企业应用程序)都可以在Docker容器中运行.但是在Docker容器中运行Java应用程序一直存在一个 ...
- 【洛谷P3899】谈笑风生
题目大意:给定一棵 N 个节点的有根树,1 号节点为根节点,现给出 Q 个询问,每次询问距离 u 号节点不超过 K 的节点 b,c 为 a 与 b 的后代,求这样的三元组有多少个. 题解:学会了线段树 ...
- os.listdir()、os.walk()和os.mkdir()的用法
内容主要参照博客https://blog.csdn.net/xxn_723911/article/details/78795033 http://www.runoob.com/python/os-wa ...
- Python中查看函数相关文档
1.dir查看对象属性 >>> dir(set) ['__and__', '__class__', '__contains__', '__delattr__', '__dir__', ...
- Mysql加锁过程详解(9)-innodb下的记录锁,间隙锁,next-key锁
Mysql加锁过程详解(1)-基本知识 Mysql加锁过程详解(2)-关于mysql 幻读理解 Mysql加锁过程详解(3)-关于mysql 幻读理解 Mysql加锁过程详解(4)-select fo ...
- Django2.1配置xadmin2.0
系统:Ubuntu18.04 环境:py3.6, django2.17, xadmin-django2.0 xadmin-django2.0下载:xadmin2.0(进入github后,在Branch ...
- windows 7中的windows键相关的快捷键
引用 https://support.microsoft.com/zh-cn/help/976857 Windows 键的位置 如果不清楚 Windows 键的位置,请参照下图: 常用的 Window ...
- 网络学习day01_计算机网络与分层思想
2018.9.1 网络学习day01_计算机网络与分层思想 网络安全 计算机网络 分层思想 LAN与WAN LAN(Local Area Network)--局域网 局域网(Local ...