一、安装并使用 influx CLI
客户端下载地址:https://docs.influxdata.com/influxdb/v2/tools/influx-cli/
二、需要下载influx服务器端和CLI工具
influxd:influx数据库的服务端。下载地址:https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.5-windows.zip
influx:连接influx数据库用的cli工具。下载地址:https://dl.influxdata.com/influxdb/releases/influxdb2-client-2.7.3-windows-amd64.zip
下载后解压,都放到一个文件夹里:
三、启动
默认配置启动,在该目录下打开命令行窗口,输入influxd.exe
即可启动:
四、删除命令:
在InfluxDB中,我们可以使用’influx delete’命令来执行删除操作。该命令可以删除指定时间范围内的数据,并根据特定的标签或字段进行过滤。下面是一个删除语句的示例:
示例一:
influx delete -org SCTECH --bucket ibms-energy --host "http://10.50.88.99:8086" --token SfzpA3333ZODld4w5A8g9qAcx7QdF7M9_mi1DCCbiAu5buuhYvwJLfucce_CvSCIE1v0bAYUyGmqqqqT5tFA== --start 2023-06-25T16:00:00.000Z --stop 2023-06-28T16:00:00.000Z --predicate "_measurement=\"read_data\" and (obid=\"ab09fddd270f6dd7def194b\")"
示例二:
influx delete -org SCTECH --bucket ibms-test --host "http://192.168.1.112:8086" --token V90000GbTV6O4SHLKooooPWeD1XAfYCq6V9t92jSoootV0dJu4p35DZMydMAkYLw_HU-qjmvIUhV3TJg== --start 2023-06-25T16:00:00.000Z --stop 2023-06-27T16:00:00.000Z --predicate _measurement="read_data"
示例三:
influx delete -org TestScada --bucket TestScada --host "http://localhost:8086" --token RzUFz4D44JeHkQz3cRL6DoXRJfIGnm1l6wCVl0BgWm19m_2PUF9eskfM3nnA5AChkZZrenZBRh4miERCruPnow== --start 2023-03-25T16:00:00.000Z --stop 2024-06-28T16:00:00.000Z --predicate _measurement="Acq_DataRecord_Tab_Test1"
标签:00,06,CLI,--,00.000,influxdb,Influx,influx From: https://www.cnblogs.com/zoro-zero/p/18148015