I installed influxdb through: pip install influxdb. Then I tried executing the following code in python:
import influxdb client = influxdb.InfluxDBClient(host='localhost', port=8086) client.create_database('exam')
But I came across the following error:
requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘localhost’, port=8086): Max retries exceeded with url: /query?q=CREATE+DATABASE+%22exam%22 (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x000001DF4715D128>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it’,))
I tried disabling the firewall, but I still get the error. What seems to be the problem?