In my case i edit the file mongod.cfg from the path C:\Program Files\MongoDB\Server\8.0\bin> and changed the net section from this net: port: 27017 bindIp: 127.0.0.1 to this net: ipv6: true port: 27017 bindIp: localhost. After that i restart the service MongoDB Server.