How run Influx cli on a windows machine

Hi, I followed all instructions at Install
InfluxDB | InfluxDB OSS 2.1 Documentation for Windows)
as well as the influx cli.
I can access InfluxDB at localhost:8086 in the browser and logged in. However, when I run the influx cli in powershell or commandline, I never get connected and always get the help menu displayed as you can notice in the snapshots.
I doubted that it was a firewall issue so I disabled firewall, but same results.

I tried to create a config file as follows

.\influx config create -n default -u http://localhost:8086 -o sierac-org -t mySuP3rS3cr3tT0keN -a

Then issued
.\influx.exe --active-config default

no way, I never could connect to InfluxDB.

In fact I am trying to follow a tutorial and need to create a database, I browsed the UI in the browser, was not able to find where I can create a database.

Thanks for your help


In InfluxDBv2 you don’t create a database, you create a bucket, find it in the GUI under Buckets.

I am not sure what you are trying to achieve.
If you run influx.exe --active-config default it just sets the configuration to the default profile - nothing more.
If you run influx.exe alone, nothing will happen, because influx.exe needs at least a [command] - as described in the help output or documentation.

I tried
influx -execute ‘SHOW DATABASES’
but getting same output. Where can I find examples for possible commands? In the URL you mentioned, only details but no examples. What I want to achieve is to be able to work with the command line.
If I understand well your response, ‘SHOW DATABASES’ does not exist anymore? OK what are the corresponding commands for Buckets? Thanks

Please take the time and read the documentation!!!

influx bucket list

Hs the URL for the tutorial

I am sorry, but i am not willing to watch a 1h+ tutorial to find out the problem.
After a very short peek into the video, i am quite sure they are using InfluxDBv1

Yes, youy are correct it is 1… something. OK, let me ask you last question and then I will try to look in the docs. When trying to add datasource in Grafana, we are always asked to give a dB name not bucket,

Thanks, I tried but getting
Error: failed to list buckets: 401 Unauthorized: unauthorized access
I went trhough the doc, there is no log command nor any hint except adding a profile which I did as I said earlier

Because this tutorial seems to be for InfluxDBv1 and in InfluxDBv1 they were called databases.
As i already said, InfluxDBv1 and InfluxDBv2 are quite different. In InfluxDBv2 they are called buckets.
You also cannot use influx cli commands from v2 on v1 and vice versa.

It was very clear to me since your 1st response, I created a bucket in the GUI but not sure what details I should put in Grafana datasource

I don’t know Grafana very well, but there should be a datasource for both InfluxDBv1 and InfluxDBv2 in current versions of Grafana. In older versions of Grafana there was no datasource for InfluxDBv2.

ok, and thanks. I googled and found hat we should use FLUX and not InfluxQL, followed the thread
“Error reading InfluxDB” when trying to add InfluxDB 2.0 Data Source with Flux Query Language · Issue #32252 · grafana/grafana · GitHub

but connection is not going through, Influx does not log or show anything.
In grafana >> add datasource >> influx DB details, it asks foe "TOKEN, is it the token found in this place (snapshot hereunder) or is it the user password, I am a little bit confused

Is there a log for InfluxDB somewhere