# Connecting influxdb node to influx database with version 1.8

**URL:** <https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529>\
**Category:** General\
**Created:** [31 January 2022 00:56 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529 "2022-01-31T00:56:41Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mufika](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Mufika](https://discourse.nodered.org/u/Mufika)\
**Post date:** [31 January 2022 00:56 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/1 "2022-01-31T00:56:41Z")

</div>

I've installed node red (version 1.8.10) and influxdb 1.8 on my raspberry pi. I've setup a database called influx. On the visual interface of node red, I can easliy connect to the influx database when I select option 1.x. But if I try to select version 1.8, it gives me the following error: {"error":"database not found: "database""}.

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [31 January 2022 01:53 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/2 "2022-01-31T01:53:52Z")

</div>

Have you tried deleting the config, and creating a new one set to 1.8flux ?

---

<div class="post-metadata">

**Author:** ![xx\_Nexus\_xx](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xx\_Nexus\_xx](https://discourse.nodered.org/u/xx_Nexus_xx)\
**Post date:** [31 January 2022 02:42 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/3 "2022-01-31T02:42:17Z")

</div>

Im using InfluxDb 1.8 on docker and running the 1.x setting in the node config

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5dd25d52317f42f5df14bfe86c76a724040ae462.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/d/6d3d6ef5b9c7393ff549cf9803d8fe6797ade81e.png)

works fine for me.. you have to be carefull as database and measurement settings are CASEsensitive

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [31 January 2022 07:10 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/4 "2022-01-31T07:10:54Z")

</div>

> [@Mufika](#):
>
> if I try to select version 1.8, it gives me the following error:

Do you mean you are selecting 1.8flux? Don't do that unless you want to use the flux query language. If you want to use the normal SQL type query language then you should use 1.x, which means any version 1 including 1.8

---

<div class="post-metadata">

**Author:** ![Mufika](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Mufika](https://discourse.nodered.org/u/Mufika)\
**Post date:** [31 January 2022 08:35 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/5 "2022-01-31T08:35:17Z")

</div>

It works fine when selecting "1.x" as the version. However I want to select the version 1.8flux in order to use the flux query language. The error comes when I select 1.8flux as the version.

---

<div class="post-metadata">

**Author:** ![Mufika](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Mufika](https://discourse.nodered.org/u/Mufika)\
**Post date:** [31 January 2022 08:36 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/6 "2022-01-31T08:36:09Z")

</div>

Correct, I want to use 1.8flux in order to use the flux query language. It seems to have more flexibility.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [31 January 2022 08:39 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/7 "2022-01-31T08:39:20Z")

</div>

Show us how you have configured the influx node and the server node.  
You can paste an image in here.

---

<div class="post-metadata">

**Author:** ![Mufika](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Mufika](https://discourse.nodered.org/u/Mufika)\
**Post date:** [31 January 2022 09:24 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/8 "2022-01-31T09:24:55Z")

</div>

This configuration with version 1.x works

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/7/87c49043d6fd568178fceb36a50705ab1384d139.png)

However, when I select 1.8, like this

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/6/06b578a3f5bc763130400011d23f86aea89ff981.png)

it starts giving the following error,

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/b/7b4faf234bd375dec120fb352c4591f016566643.png)

I've tried adding the name of my database in the url like,  
[http://localhost:8068/influx](http://localhost:8068/influx), but it does not work.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [31 January 2022 09:37 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/9 "2022-01-31T09:37:22Z")

</div>

What query have you specified for the 1.8flux in node?

---

<div class="post-metadata">

**Author:** ![Mufika](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Mufika](https://discourse.nodered.org/u/Mufika)\
**Post date:** [31 January 2022 11:24 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/10 "2022-01-31T11:24:29Z")

</div>

This is the simple query I have at the moment

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/f/af0d9669e50915ba5a905a9b3b8a96275783e6cb.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [31 January 2022 11:44 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/11 "2022-01-31T11:44:39Z")

</div>

I haven't seen `set` used in `from`, where did you get that from? I use  
`from(bucket:"database_name/retention_period")`  
where database\_name is the database name and retention\_period is the retention period, obviously.

---

<div class="post-metadata">

**Author:** ![Mufika](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Mufika](https://discourse.nodered.org/u/Mufika)\
**Post date:** [31 January 2022 12:05 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/12 "2022-01-31T12:05:23Z")

</div>

I've changed as per below:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/9/c9b4f6c66a603c1bdad53c3c7a4f7b6893aa1aab.png)

however, I see the following message:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/3/735bc1c164daec84ffb360c0ff8aabf4bf3d28c8.png)

but I've done the appropriate changes in the config file, and also added a self-certified key.

---

<div class="post-metadata">

**Author:** ![Mufika](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Mufika](https://discourse.nodered.org/u/Mufika)\
**Post date:** [31 January 2022 12:08 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/13 "2022-01-31T12:08:15Z")

</div>

this is my section http of my config file  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/d/dd37311806dcf5836fa06a506bd56b38ea0010ee.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [31 January 2022 12:21 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/14 "2022-01-31T12:21:33Z")

</div>

Please don't post images when you could paste the text, as it prevents me from copying out of it.  
You need to remove the `#` characters on the lines you have changed. The `#` makes the line a comment which has no effect. The values are there to show you the defaults.

---

<div class="post-metadata">

**Author:** ![Mufika](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Mufika](https://discourse.nodered.org/u/Mufika)\
**Post date:** [31 January 2022 14:28 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/15 "2022-01-31T14:28:38Z")

</div>

Oups ... I've removed the #'s but it messes up everything ... my Grafana and my nodered dashboards stopped working. It may just be better to stick with version 1.x for now.

---

<div class="post-metadata">

**Author:** ![Mufika](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Mufika](https://discourse.nodered.org/u/Mufika)\
**Post date:** [13 February 2022 18:07 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/16 "2022-02-13T18:07:51Z")

</div>

I've setup my rpi on 64bit, installed influxdb v2 on a docker compose configuration. Definitely works better, after a bit of a learning curve on the flux language.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 April 2022 18:07 UTC](https://discourse.nodered.org/t/connecting-influxdb-node-to-influx-database-with-version-1-8/57529/17 "2022-04-14T18:07:52Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
