我该如何解决启动期间无法设置套接字.当我运行mongodb服务器时? [英] How can I solve " Failed to set up sockets during startup" when I run mongodb server?

查看:65
本文介绍了我该如何解决启动期间无法设置套接字.当我运行mongodb服务器时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了mongodb

I had install mongodb

我尝试像这样在命令提示符下运行mongodb服务器:

I try run mongodb server on command promp like this :

mongod.exe --dbpath=c:\mongodata

存在这样的错误:

我尝试运行:netstat -a -n -o | find "27017"

但是是一样的.仍然存在错误

But it's the same. There still exist error

我从这里获得参考:我有参考.但这不起作用

I had the reference. But it does not work

如何解决该错误?

推荐答案

如果要在Windows中使用命令提示符启动mongodb,请在完成后将环境变量设置为global.您可以在Windows中键入mongod,在该窗口中,MongoDB从默认端口27017开始.要在Windows中设置环境变量,请搜索环境变量-> path,主要添加mongodb路径

If you want to start mongodb with command prompt in windows, set the environmental variable global, once you done. You can type mongod in windows where the MongoDB starts on the default port 27017. To set environment variable in windows search environmental variable->path add the mongodb path mostly

c:/Program Files/MongoDB/Server/3.6/bin/

根据您在系统上安装的MongoDB,相应地更改版本号3.6.

Change version no 3.6 accordingly based on MongoDB you installed on your system.

这篇关于我该如何解决启动期间无法设置套接字.当我运行mongodb服务器时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆