Influx cli 2 -> influx 1.X

Hi,
I am trying to connect remotely to a influxdb 1.x

I see there is a v1 command in the help list of the version 2.7.5 cli.

I see I need to create a v1 config, to be able to connect, but I find some good documentation for this.

Any help is appreciated.

Regards,
Anthony

@Killjoyz InfluxDB 1.x and 2.x use different authentication methods. To connect to a 1.x instance, you need to use the 1.x influx CLI. This should be packaged with your InfluxDB 1.x binaries. The 2.x CLI should only be used with InfluxDB 2.x.

My understanding there is an option to connect to influx 1.x with using the command influx v1 shell.

No, the influx v1 shell command starts a InfluxQL REPL that connects to an InfluxDB v2 instance using the v1-compatibility API. This API lets InfluxDB v1 clients connect to and use InfluxDB v2.

I got it working

C:\>curl -sl -I localhost:8086/ping
HTTP/1.1 204 No Content
Content-Type: application/json
Request-Id: c321629a-2429-11ef-801a-0242ac110002
X-Influxdb-Build: OSS
X-Influxdb-Version: 1.8.10
X-Request-Id: c321629a-2429-11ef-801a-0242ac110002
Date: Thu, 06 Jun 2024 17:25:25 GMT


C:\>influx v1 shell
InfluxQL Shell v2.7.5
Connected to InfluxDB OSS 1.8.10
> SHOW DATABASES
>
   clear        Clears settings such as database
   DELETE
   DROP
   exit         Exit the InfluxQL shell
   EXPLAIN
   format       Specify the data display format

Interesting. I didn’t know it was possible, but after thinking about it, I guess it would be. The APIs are essentially the same. Very cool.

https://media3.giphy.com/media/v1.Y2lkPTc5MGI3NjExN3M0dDdtdnJtaWMxMnNzZDVwd2FtbGplN3E0NDJhbGFxYm54Zzc4byZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/3og0IMJcSI8p6hYQXS/giphy.webp

1 Like