connect ECONNREFUSED 解决方法

来源:luqidong 发布时间:2014-03-17 20:47:09 点击数:

错误代码:

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
          ^
Error: connect ECONNREFUSED
    at errnoException (net.js:632:11)
    at Object.afterConnect [as oncomplete] (net.js:623:18)

 

解决方法:

1、在mysql.conf,设置skip-networking;

2、尝试设置这样的socket:

 

var client = mysql.createClient({

user: uuuu,
password: pppp,
host: '127.0.0.1',
port: '3306',
_socket: '/var/run/mysqld/mysqld.sock',});

 

本文由免费oa系统78oa原创,转载请注明出处。