您的位置:首页 > 博客中心 > 数据库 >

window上mongodb错误:No connection could be made

时间:2022-03-14 03:42

今天在慕课网(很不错的一个IT技术免费网站)上学习nodeJS开发电影网站,其中使用到了mongo数据库,但是在执行中遇到了如下错误!

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.

试了一下,使用两个命令行,一个用于接收连接,一个用于发送连接。问题是解决了,但是还是没发现问题的本质原因,如有知道了,请给我留言,谢谢各位。


热门排行

今日推荐

热门手游