mongo报错(Error:|mongo报错:Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed)

在window输入mongo报错
mongo报错(Error:|mongo报错:Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed)
文章图片
image.png 接下来换成mongod, 发现
mongo报错(Error:|mongo报错:Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed)
文章图片
image.png 原因是找不到相关的文件夹,
解决方案,在相关文件夹下面建立文件夹咯 之后,mongod
mongo报错(Error:|mongo报错:Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed)
文章图片
image.png 【mongo报错(Error:|mongo报错:Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed)】就启动成功了

    推荐阅读