1. If you open the terminal and execute Mongo directly, it will be prompted that you cannot connect to 127.0.0.1:27017
Reason: No mongoDB service running
2. Run mongoDB service method
Open the terminal and execute Mongod — dbPATH D:\ tools \mongoDB\data\ DB (the path that dbPATH points to is the data storage directory created when installing mongoDB, which is the path of data/ DB and can be modified according to the location of the path created by yourself). The contents shown in the following figure will prove that the first step is OK
3. At this point, open another terminal and execute the mongo local connection successfully
Reason: No mongoDB service running
2. Run mongoDB service method
Open the terminal and execute Mongod — dbPATH D:\ tools \mongoDB\data\ DB (the path that dbPATH points to is the data storage directory created when installing mongoDB, which is the path of data/ DB and can be modified according to the location of the path created by yourself). The contents shown in the following figure will prove that the first step is OK
3. At this point, open another terminal and execute the mongo local connection successfully
Read More:
- Mongodb uses Mongo to report error: could’t connect to server 127.0.0.1:27017, connection attempt failed: socket
- MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect EC
- JDBC connect to Sql Server to connect to the database–The TCP/IP connection to the host localhost, port 1433 has failed
- Connection error:Cannot connect to redis-server. Details are available in connection log.
- [Solved] failed to connect to server, reason: Unable to establish connection
- 【Synergy】Error:failed to connect to server:Connection was refused
- CentOS Liunx 7 uses rdesktop to remotely connect to the Alibaba Cloud server and it appears Failed to connect, CredSSP required by server.
- Failed to connect to remote VM. Connection reused. Connection reused: Connect
- PHP under linux uses pdo-dblib to connect to mssql to report an error solution. Error message: SQLSTATE[01002] Adaptive Server connection failed (severity 9)
- Failed to connect to Mir:Failed to connect to server socket:No such file or directory
- RTMP_Connect0, failed to connect socket. 110 (Connection timed out)
- 【MongoDB】 Failed to connect to 127.0.0.1:27017, reason: Connection refused
- MySQL: if the remote connection using navicatip fails, prompt “is not allowed to connect to this MySQL server”
- error:Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused;error:couldn‘t ….
- node.js Server MySQL database connection timeout (error: connect etimeout)
- How to Fix adb_server_notify: ADB server connection failed
- curl: (7) Failed connect to localhost:9200; Connection refused
- JMeter performance test monitoring server resource reported error: java.net.ConnectException : Connection refused: connect
- curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
- Vscode remote connection server reports an error: could not establish connection to “XXXXXX” [resolved]