# Mysql etimedout

**URL:** <https://discourse.nodered.org/t/mysql-etimedout/25703>\
**Category:** General\
**Created:** [28 April 2020 21:51 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703 "2020-04-28T21:51:14Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [28 April 2020 21:51 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/1 "2020-04-28T21:51:14Z")

</div>

After doing a lot of mysql locally i am trying something from one to another server now  
It works but after about 8 seconds i get etimedout  
When i trigger the node again i get a correct output then 8 sec later again a etimedout

What could be the cause of the this?

---

<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:** [28 April 2020 21:56 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/2 "2020-04-28T21:56:45Z")

</div>

Not sure - there seem to be quite a few indications on google that it means there is a connection issue to your server.

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [28 April 2020 21:59 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/3 "2020-04-28T21:59:17Z")

</div>

i found some.  
most are about firewall  
disabled the firewall, the de timedout comes from 4 seconds  
so the error is faster then.

any other ideas are more then welcome, couldnt find other ideas

---

<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:** [29 April 2020 09:42 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/4 "2020-04-29T09:42:31Z")

</div>

If you connect from the node red server machine using the msyql command line does it fail after a while in a similar way?  
Also look in the mysql logs for any clues.

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [29 April 2020 11:49 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/5 "2020-04-29T11:49:10Z")

</div>

Ok i will try it from the command line.  
But ehhh how can i do that?

---

<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:** [29 April 2020 12:53 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/6 "2020-04-29T12:53:31Z")

</div>

> [@RogierQ](#):
>
> But ehhh how can i do that?

By installing a mysql command line client. On Ubuntu that is `mysql-client` I believe.

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [29 April 2020 20:38 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/7 "2020-04-29T20:38:55Z")

</div>

Is running and no errors or problems with cmd line  
So i gues it is nodejs or something??

---

<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:** [29 April 2020 21:26 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/8 "2020-04-29T21:26:47Z")

</div>

Did you have a look in the mysql logs?

Also start node-red in a terminal and see if there are any other errors or warnings there. What version of node-red, nodjs and the sql node are you using? In fact it might be worth starting node-red in a terminal and copying the log in the terminal up to the point of failure and posting it here.

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [30 April 2020 21:41 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/9 "2020-04-30T21:41:51Z")

</div>

My provider and friend checked all but cannot find a solution.  
I can create a test account if you like so you can have a look at it to check if it is not NR related.  
Is that an idea?

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [1 May 2020 20:08 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/10 "2020-05-01T20:08:10Z")

</div>

While searching thru the forum i found out that i did not include the error message  
"Error: connect ECONNREFUSED 99.99.97.99:3306"  
maybe this helps or someone else in the future... i continue to find a fix 😉

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [1 May 2020 20:52 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/11 "2020-05-01T20:52:20Z")

</div>

> [@RogierQ](#):
>
> 99.99.97.99

Is that really the IP address of the mysql server? Show us a picture of the config where you enter the mysql server address.

---

<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:** [1 May 2020 20:54 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/12 "2020-05-01T20:54:48Z")

</div>

> [@Colin](#):
>
> Also start node-red in a terminal and see if there are any other errors or warnings there. What version of node-red, nodjs and the sql node are you using? In fact it might be worth starting node-red in a terminal and copying the log in the terminal up to the point of failure and posting it here.

Also you don't seem to have responded to this.

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [1 May 2020 21:06 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/13 "2020-05-01T21:06:09Z")

</div>

no i changed the ip.

strange thing is that it works and i get a response from the database server

but after few seconds it is down

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [1 May 2020 21:10 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/14 "2020-05-01T21:10:22Z")

</div>

NR version 1.0.6  
node-red-node-mysql 0.1.0  
Node.js version: v12.16.2

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [1 May 2020 21:12 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/15 "2020-05-01T21:12:13Z")

</div>

whoohooo i think i got it working now

truned on skip-external-locking on sql server side

---

<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:** [1 May 2020 21:17 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/16 "2020-05-01T21:17:28Z")

</div>

That should be on by default, whoever turned it off may have had a reason.

---

<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:** [1 May 2020 21:17 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/17 "2020-05-01T21:17:39Z")

</div>

interesting... - wonder what that does ? - will have to go look.

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [1 May 2020 21:22 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/18 "2020-05-01T21:22:09Z")

</div>

it was a new install, no idea who or what  
only saw somewhere that it is not advised to turn it on

_For mysqld external locking is controlled by the value of the skip\_external\_locking system variable. When this variable is enabled, external locking is disabled, and vice versa. External locking is disabled by default._

[https://dev.mysql.com/doc/refman/8.0/en/external-locking.html](https://dev.mysql.com/doc/refman/8.0/en/external-locking.html)

---

<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:** [30 June 2020 21:22 UTC](https://discourse.nodered.org/t/mysql-etimedout/25703/19 "2020-06-30T21:22:15Z")

</div>

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