首页 > 代码库 > window上mongodb错误:No connection could be made
window上mongodb错误:No connection could be made
今天在慕课网(很不错的一个IT技术免费网站)上学习nodeJS开发电影网站,其中使用到了mongo数据库,但是在执行中遇到了如下错误!
Failed to connect to 127.0.0.1:27017, reason: errno:10061 No connection could be made because the target machine actively refused it.
...
在http://stackoverflow.com/questions/23726684/mongodb-on-a-windows-7-machine-no-connection-could-be-made中找到了解决办法,如下:Error: couldn‘t connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146 exception: connect failed
2down vote | I got same error and fixed it by: 1) mkdir c:\data 2) cd data 3) mongod -dbpath . 4) Now in another command window i was able to connect from my client using "mongo" command. |
window上mongodb错误:No connection could be made
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。