# Node-red-contrib-sql

**URL:** <https://discourse.nodered.org/t/node-red-contrib-sql/7683>\
**Category:** General\
**Created:** [7 February 2019 05:02 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683 "2019-02-07T05:02:21Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![smriths05](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@smriths05](https://discourse.nodered.org/u/smriths05)\
**Post date:** [7 February 2019 05:02 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/1 "2019-02-07T05:02:22Z")

</div>

Hello everyone. I am having issues with the sql insert node, which is part of the sql package. I am unable to link it to the mysql database node. When I searched for a possible solution, it said that I have to modify the configuration node which is available near the deploy button in the dropdown. I tried but was unsuccessful. I will paste the ss here. Could anyone suggest a solution please?

 ![SS1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/11ee6c78132fca50d0f968f78740a95eb31a2df7.png)

---

<div class="post-metadata">

**Author:** ![smriths05](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@smriths05](https://discourse.nodered.org/u/smriths05)\
**Post date:** [7 February 2019 07:13 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/2 "2019-02-07T07:13:20Z")

</div>

![SS2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/bbb92fc530836c98ae846aace47df8c74eec18b9.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:** [7 February 2019 07:32 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/3 "2019-02-07T07:32:55Z")

</div>

What error are you seeing?  
Also tell us what operating system you are running on and post here the startup log from node red. It should start with the Welcome to node red message.  
Finally are you able to connect to the database using a command line SQL client?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [7 February 2019 08:28 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/4 "2019-02-07T08:28:00Z")

</div>

You've pasted the wrong config screen. The one you have shared is the one from the mysql node (the orange one in your flow), you need to configure the light blue one ( as it indicates with the red triangle). If you double click on that one, how have you got it configured?

Although as @Colin states you can create an INSERT statement in a function node or a template node.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [7 February 2019 11:40 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/5 "2019-02-07T11:40:16Z")

</div>

One other point, if the 'sql package' is node-red-contrib-sql, you should realize it hasn't been updated since May of 2017...

---

<div class="post-metadata">

**Author:** ![smriths05](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@smriths05](https://discourse.nodered.org/u/smriths05)\
**Post date:** [8 February 2019 04:57 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/6 "2019-02-08T04:57:46Z")

</div>

![SS3](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f62901a4b883c129828ee63a39cbd7eb2e8ae5f6.jpeg)

I forgot to attach the other SS sorry

---

<div class="post-metadata">

**Author:** ![smriths05](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@smriths05](https://discourse.nodered.org/u/smriths05)\
**Post date:** [8 February 2019 05:00 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/7 "2019-02-08T05:00:35Z")

</div>

I am using Windows 10. And there is no problem with my node red booting. Yes I am able to connect to the database using SQL client, that is part of another flow. I am able to manually run the sql query commands, using the function node that is not the issue here. I am unable to do so dynamically. I want the incoming data to populate automatically into the database without having to manually insert it each time.

---

<div class="post-metadata">

**Author:** ![smriths05](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@smriths05](https://discourse.nodered.org/u/smriths05)\
**Post date:** [8 February 2019 05:04 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/8 "2019-02-08T05:04:15Z")

</div>

Here is the start up log

 ![SS5](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/9b4f220ebb436d243c669e6e74627cfe43c09550.png)

---

<div class="post-metadata">

**Author:** ![smriths05](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@smriths05](https://discourse.nodered.org/u/smriths05)\
**Post date:** [8 February 2019 05:22 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/9 "2019-02-08T05:22:08Z")

</div>

![SS6](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/0972d0392432bf653f59fe97a7f0011a88dad6e7.png)

---

<div class="post-metadata">

**Author:** ![smriths05](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@smriths05](https://discourse.nodered.org/u/smriths05)\
**Post date:** [8 February 2019 05:22 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/10 "2019-02-08T05:22:51Z")

</div>

![SS7](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/848f2d55d4704bb40aaf45235b3ec49030b91b0d.png)

---

<div class="post-metadata">

**Author:** ![smriths05](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@smriths05](https://discourse.nodered.org/u/smriths05)\
**Post date:** [8 February 2019 05:23 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/11 "2019-02-08T05:23:43Z")

</div>

![SS8](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/c5422802d357a487f7ec88a3dc8fed102f46e576.png)

---

<div class="post-metadata">

**Author:** ![smriths05](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@smriths05](https://discourse.nodered.org/u/smriths05)\
**Post date:** [8 February 2019 05:24 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/12 "2019-02-08T05:24:59Z")

</div>

![SS9](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/71de91a0b6ddb6867e2e743d6df6c524cf2bbc85.png)

---

<div class="post-metadata">

**Author:** ![smriths05](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@smriths05](https://discourse.nodered.org/u/smriths05)\
**Post date:** [8 February 2019 05:26 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/13 "2019-02-08T05:26:36Z")

</div>

As you can see, manual insertion is not an issue. I need help to configure the sql insert node to carry out the same process dynamically. I would be grateful if you can help me come up with some solution. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [8 February 2019 07:22 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/14 "2019-02-08T07:22:17Z")

</div>

So where is the data you want to insert coming from ? What does it look like, can you feed it into a debug node and show us ?

---

<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:** [8 February 2019 09:32 UTC](https://discourse.nodered.org/t/node-red-contrib-sql/7683/15 "2019-02-08T09:32:08Z")

</div>

If you can insert it using a function node as you have shown, why not just do it that way? Why do you need to use the sql insert node?  
In the info panel for the sql insert node does it say that you can configure it dynamically? If not then you probably cannot.
