0
点赞
收藏
分享

微信扫一扫

mongo进入报错


问题:在cmd中,输入命令mongo就报错

couldn’t connect to server 127.0.0.1:27017

mongo进入报错_数据库


应该是没有启动服务的原因,打开服务,并没有发现MongoDB这个服务

mongo进入报错_nosql_02

解决方法

还是在cmd中,输入下面两个命令

(1)删除服务

sc delete MongoDB

(2)创建服务,注意创建的位置

sc create MongoDB binPath= “C:\Program Files\MongoDB\Server\4.0\bin\mongod.exe --service --config=D:\mongodb\mongo.config”

最后打开服务,启动服务

mongo进入报错_mongodb_03


再次进入mongo,成功了

mongo进入报错_数据库_04


举报

相关推荐

0 条评论