我如何解决错误:MongoTimeoutError:服务器选择在30000毫秒后超时,无法连接到服务器127.0.0.1:27017

我如何解决错误:MongoTimeoutError:服务器选择在30000毫秒后超时,无法连接到服务器127.0.0.1:27017

guozili1983 回答:我如何解决错误:MongoTimeoutError:服务器选择在30000毫秒后超时,无法连接到服务器127.0.0.1:27017

要在本地连接MondoDB时解决此错误。 enter image description here enter image description here enter image description here

使用以下这些步骤重新连接或再次在本地连接MongoDB。 1.在安装了MongoDB的 bin 文件夹中打开两个cmds。 像:(C:\ Windows \ System32 \ cmd.exe)

  1. 在第一次cmd运行中:mongod,随后的命令如下图所示运行。 enter image description here

  2. 在第二个cmd中运行:mongo enter image description here

完成上述所有步骤后,请在本地重新连接MongoDB

本文链接:https://www.f2er.com/2786673.html

大家都在问