Skip to content

InfluxDB database

Once the containers are up, it will be necessary to generate a database inside the container that runs the InfluxDB software. To do so, you will enter the container's dedicated terminal and access the InfluxDB command line interface.

First of all, you must identify the name of the Influxdb container, as indicated in the following screenshot:

Now you must enter the following command to access the container terminal:

 sudo docker exec -it <name_of_the_container> bash

Next, you must enter the word "influx" to access the InfluxDB command line interface, receiving a response like the one in the following screenshot.

Finally, using the following command you can generate a database:

> create database <name_of_the_database>

To verify that you have done it correctly, you can access the list of databases created by entering the following command:

> show databases

The terminal should return a list in which you will find two databases: one with the name “_internal”, which stores internal InfluxDB data, and the one you have created.

You can find all the documentation regarding the commands used to manage databases from the Influxdb command line interface at the following link:

https://docs.influxdata.com/influxdb/v1.8/query_language/manage-database/