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.

  • Start InfluxDB

docker exec -it influxdb influx
  • Then create the database and the user

// 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'\\

Last updated

Assoc. Prof. Wiroon Sriborrirux, Founder of Advance Innovation Center (AIC) and Bangsaen Design House (BDH), Electrical Engineering Department, Faculty of Engineering, Burapha University