# Node red connection to remote mysql

**URL:** <https://discourse.nodered.org/t/node-red-connection-to-remote-mysql/73582>\
**Category:** General\
**Tags:** database\
**Created:** [12 January 2023 08:27 UTC](https://discourse.nodered.org/t/node-red-connection-to-remote-mysql/73582 "2023-01-12T08:27:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sahar/32/86660_2.png) [@sahar](https://discourse.nodered.org/u/sahar)\
**Post date:** [12 January 2023 08:27 UTC](https://discourse.nodered.org/t/node-red-connection-to-remote-mysql/73582/1 "2023-01-12T08:27:57Z")

</div>

Hi , I am using node red at my windows 10 , and my database is located at different server with [www.lifeandb.com](http://www.lifeandb.com) domain ,now I try to connect to that DB with MySQL node with my db. information to send sensors data , but it doesn't work and connect ,my first question is ,is it possible to connect or not ? and the second ,how I can do it?

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [12 January 2023 08:37 UTC](https://discourse.nodered.org/t/node-red-connection-to-remote-mysql/73582/2 "2023-01-12T08:37:36Z")

</div>

What you are trying to do is surely possible as a number of people on the forum do that.  
Is it possible for you to share the Node-RED flow you have created so far?  
If you can do this, then it would help us to help you further.

---

<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:** [12 January 2023 08:58 UTC](https://discourse.nodered.org/t/node-red-connection-to-remote-mysql/73582/3 "2023-01-12T08:58:48Z")

</div>

Also, have you tried connecting using the mysql command line tool, or other client? Once that works then you will know that it is possible in node red.

---

<div class="post-metadata">

**Author:** ![sahar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sahar/32/86660_2.png) [@sahar](https://discourse.nodered.org/u/sahar)\
**Post date:** [12 January 2023 11:34 UTC](https://discourse.nodered.org/t/node-red-connection-to-remote-mysql/73582/4 "2023-01-12T11:34:43Z")

</div>

![1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/6/26cb7efff04da68ce963cd2798dda688dc8dd29f.jpeg)  
 ![2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/e/3ea8946358c34f2fc149a7fa3aee16714ba741dd.jpeg)

---

<div class="post-metadata">

**Author:** ![sahar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sahar/32/86660_2.png) [@sahar](https://discourse.nodered.org/u/sahar)\
**Post date:** [12 January 2023 11:35 UTC](https://discourse.nodered.org/t/node-red-connection-to-remote-mysql/73582/5 "2023-01-12T11:35:59Z")

</div>

template :  
INSERT INTO sensor\_data (id,sensor,location,value1,value2,reading\_time) VALUES ( {{1}},{{1}},{{1}},{{1}},{{1}} )

---

<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:** [12 January 2023 11:48 UTC](https://discourse.nodered.org/t/node-red-connection-to-remote-mysql/73582/6 "2023-01-12T11:48:11Z")

</div>

You should not have the http on the front. Are you sure that is the right URL for the database?

---

<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:** [12 January 2023 12:22 UTC](https://discourse.nodered.org/t/node-red-connection-to-remote-mysql/73582/7 "2023-01-12T12:22:53Z")

</div>

In your initial post you say you are using `www.lifeandb.com` but a domain lookup shows that domain is up for sale.

Then in your configuration you use `www.lifeandbusiness.com` but entering that into a browser gets you this:

 ![Screenshot 2023-01-12 at 7.16.29 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/9/197b10171053521372d017ff75bc83e8d41e8f04.png)

If you had a database with them, I hope you have a backup because it looks like it has gone under.

---

<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:** [13 March 2023 12:23 UTC](https://discourse.nodered.org/t/node-red-connection-to-remote-mysql/73582/8 "2023-03-13T12:23:18Z")

</div>

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