ECONNREFUSED ::1:3306
마스터욱
0
5
0
0
2022-11-21 18:06:25
Error: connect ECONNREFUSED ::1:3306
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)
--------------------
at Protocol._enqueue (/home/sfunds/www_watch/node/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/home/sfunds/www_watch/node/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at PoolConnection.connect (/home/sfunds/www_watch/node/node_modules/mysql/lib/Connection.js:116:18)
at Pool.getConnection (/home/sfunds/www_watch/node/node_modules/mysql/lib/Pool.js:48:16)
at query (/home/sfunds/www_watch/node/_all/_bybit.js:63:7)
at set_timelog (/home/sfunds/www_watch/node/_all/_bybit.js:161:2)
at _self.socket_usdt.onmessage (/home/sfunds/www_watch/node/_all/_bybit.js:938:5)
at WebSocket.onMessage (/home/sfunds/www_watch/node/node_modules/ws/lib/event-target.js:199:18)
at WebSocket.emit (node:events:513:28)
at Receiver.receiverOnMessage (/home/sfunds/www_watch/node/node_modules/ws/lib/websocket.js:1022:20) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 3306,
fatal: true
}
Node.js v18.12.1
============================================================================
Node.js 버전을 18.12.1 로 올렸더니, 기존에 잘되던 소스가 작동이 안되었다.
뭐 구글링해서 알아보니 기존의 db접속 호스트를
localhost -> 127.0.0.1 로 바꾸면 될거다 라는 글이 있었다.
내가 알기론 localhost 나 127.0.0.1 이나 똑같은 건데...
근대 바꾸니깐 진짜 되는 것이었다. 뭐냐 이거???