# Install InfluxDB

Install InfluxDB:

```
sudo docker pull influxdb
```

Start InfluxDB:

```
sudo docker run -d -p 8086:8086 -v influxdb:/var/lib/influxdb --name influxdb influxdb
```

After installed InfluxDB, the next step is creating a database set and user that will access this database. Note that this user will be used by Telegraf when it accesses to the database to store data coming from the MQTT channel.&#x20;

* Start InfluxDB

```
docker exec -it influxdb influx
```

* Then create the database and the user

```java

// This is a one line operation, you need to write one line and execute \\

create database sensors

create user "telegraf" with password 'telegraf'

grant all on sensors to telegraf

// with all of these, you have created a database named sensors and a username "telegraf" with password 'telegraf'\\
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aic-eec.com/general/hot-cloud/installations/install-influxdb.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
