Hi, team. i am running mysql server(127.0.0.1) 8.0 on my local windows machine. My node-red is running on a remote gateway (192.168.1.1) .
my windows 10 computer is connected to the gateway through a ethernet cable. so i can use node-red in my chrome by putting the address http://192.168.1.1:1880/#. so can the node-red connect to my local database running in my pc?
Error: connect ECONNREFUSED 127.0.0.1:3306
This is a loopback address. It essentially means "this computer". Since node-red is on a different device, it cannot access mysql on a your computer using that IP. You will need to provide the IP of your computer. You will also likely need to open that port number in the windows firewall.
One alternative, if you can't update your remote gateway (whatever that means), would be to buy a $15 Raspberry Pi Zero Two W and install Node-red on that.
You would get up-to-date Node-red, node.js & npm and could use node-red-node-mysql v2.0.0 and up-to-date MySQL.
Or even a Pi 5 with Node-red and Mariadb (= mysql).