In the console input mongod
start mongodb service, the address bar enter http: // localhost: 27017 / to see the chart below indicates the service started successfully.
Open the "MongoDB Compass Community" software, click on "connect" button Times MongoDB not running on the provided host and port of error, as shown below:
Cause: Due to the need, configure 127.0.0.1 as xxxx in the host file, it should be replaced by localhost