Skip to content
Configuring a Connection in MySQL and Node.js
Profile icon
vedprad1

Configuring a Connection in MySQL and Node.js

I am trying to use MySQL in Node.js to use databases. However, when i try to tun the program that can be accessed here, I get this error:

Process crashed with: Error: connect ECONNREFUSED 127.0.0.1:8000 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1104:14) -------------------- at Protocol._enqueue (/home/runner/node_modules/mysql/lib/protocol/Protocol.js:144:48) at Protocol.handshake (/home/runner/node_modules/mysql/lib/protocol/Protocol.js:51:23) at Connection.connect (/home/runner/node_modules/mysql/lib/Connection.js:119:18) at evalmachine.<anonymous>:11:5 at Script.runInContext (vm.js:107:20) at Object.runInContext (vm.js:285:6) at evaluate (/run_dir/repl.js:133:14) at ReadStream.<anonymous> (/run_dir/repl.js:116:5) at ReadStream.emit (events.js:189:13) at addChunk (_stream_readable.js:284:12)

Does anyone know what I can do?

The code can be found here.

You are viewing a single comment. View All
Answered by heyitsmarcus [earned 5 cycles]
View Answer
Profile icon
heyitsmarcus

@heyitsmarcus
sorry,
@vedprad1
, I accidentally used your repl link instead of mine! I edited the comment for my repl hahaha