node-msql 需要指定socketPath才能连接成功?
发布于 11 年前 作者 superbug 4171 次浏览 最后一次编辑是 8 年前

如题,求大神解释。。。。。不指定socketPath就报如下错误:

Error: connect ECONNREFUSED at errnoException (net.js:901:11) at Object.afterConnect [as oncomplete] (net.js:892:19) -------------------- at Handshake.Sequence (/home/swj/workspace/backbonedemo/node_modules/mysql/lib/protocol/sequences/Sequence.js:15:20) at new Handshake (/home/swj/workspace/backbonedemo/node_modules/mysql/lib/protocol/sequences/Handshake.js:9:12) at Protocol.handshake (/home/swj/workspace/backbonedemo/node_modules/mysql/lib/protocol/Protocol.js:42:50) at Connection.connect (/home/swj/workspace/backbonedemo/node_modules/mysql/lib/Connection.js:73:18) at Object.<anonymous> (/home/swj/workspace/backbonedemo/routes/index.js:16:12) at Module._compile (module.js:456:26) at Object.Module._extensions…js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17)

回到顶部