Asked 7 years ago
6 Feb 2017
Views 1295
yogi

yogi posted

error in MySQL connection in Node Js

error in MySQL connection in Node Js

if (error) throw error;
               ^

Error: connect ECONNREFUSED 127.0.0.1:3306
    at Object.exports._errnoException (util.js:1026:11)
    at exports._exceptionWithHostPort (util.js:1049:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)




i am using it with Express Framework

Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

actually i got this error many time when i forget to start MySQL server

try to reconnect the server after start / refresh the server

if you have any other module of server like LAMP , WAMP Or XAMP , You need to start the bundle inshort .

you will not find this type of error in online server because they have always running server.

if you getting this error in hosting than try to contact them to so they enable MySQL server.
Post Answer