我已经使用命令propt为Mongodb创建了索引,但是收到错误消息。这段代码来自python shell
>>> import pymongo
>>> from pymongo import MongoClient
>>> myClient = MongoClient
>>> myClient = MongoClient()
>>> db = myClient.mydb
>>> users = db.users
>>> db.users.create_index([("username", pymongo.ASCENDING)])
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [WinError 10061] No connection could be made because the target machine actively refused it