I have use case for which I need to push data from InfluxDB to MySQL regularly. It tried googling, but did not find much on it. Is there anyway to push data from InfluxDB to MySQL.
1 Like
Please share your thoughts
Normally, this is something that Telegraf would do, but we don’t currently have an output plugin for MySQL (we do have pull requests open for postgresql output). You might be able to use the backup tools on InfluxDB to create a backup and write something custom to insert it into MySQL in the format you need.
There may be a few clunky ways to do this, but no way to directly push data from Influx to MySQL.
One way is to write a Python script to read data from InfluxDB and then write it out to MySQL.
- pip install pymysql
- Use these imports at the top of the script
import pymysql.cursors
import pymysql
Clearly, there is more to it. But that’s a way to get started.