Loading historical data from mysql table to influxdb with Telegraf

Hello,
I am new to InfluxDB.
I am trying to write historical data from mysql table to influxdb. Is there any way to use Telegraf for this case? (I tried but I could write only real-time events from mysql instead of data from my table.)

If not, do you have any ideas how to send historical data to influxdb easily?

Please advise. Thank you!

Regards,
Aleksandra

As far as I know, there is no input plugin for Telegraf that allows you to import historical data from a MySQL database.

In principle, of course, a timestamp should be available for the entries in the MySQL database.
What comes to my mind quickly:

  1. write a script that exports the data from the MySQL database and saves it in the influx line protocol format. The format is quite simple. Then import the file into InfluxDB.
  2. write an inputs.exec or inputs.execd plugin for Telegraf that exports the data from the MySQL database
  3. without Telegraf, query the MySQL database directly from InfluxDB with flux sql.from()

The following links as a suggestion:

Thank You @Franky1 ! You helped me a lot.

Hi could someone advice me on how to pull data from mysql database using telegraf please. Ideally I would like them to be published on cloud watch.