PROTOCOL_SEQUENCE_TIMEOUT

我在c9 environnment上做了我的项目,现在我试图在本地服务器上使用它。 我的数据库运行在个人本地服务器上,看起来像mamp,在8080.我的web服务器在8888.问题是,当我尝试使用mysql.createPool函数,我有一个超时,这个错误:

{ Error: Handshake inactivity timeout at Handshake.<anonymous> (/Users/me/http/MyWebSite/matcha/node_modules/mysql/lib/protocol/Protocol.js:160:17) at emitNone (events.js:86:13) at Handshake.emit (events.js:185:7) at Handshake._onTimeout (/Users/me/http/MyWebSite/matcha/node_modules/mysql/lib/protocol/sequences/Sequence.js:127:8) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) -------------------- at Protocol._enqueue (/Users/me/http/MyWebSite/matcha/node_modules/mysql/lib/protocol/Protocol.js:141:48) at Protocol.handshake (/Users/me/http/MyWebSite/matcha/node_modules/mysql/lib/protocol/Protocol.js:52:41) at PoolConnection.connect (/Users/me/http/MyWebSite/matcha/node_modules/mysql/lib/Connection.js:130:18) at Pool.getConnection (/Users/me/http/MyWebSite/matcha/node_modules/mysql/lib/Pool.js:48:16) at /Users/me/http/MyWebSite/matcha/routes/users.js:96:14 at Layer.handle [as handle_request] (/Users/me/http/MyWebSite/matcha/node_modules/express/lib/router/layer.js:95:5) at next (/Users/me/http/MyWebSite/matcha/node_modules/express/lib/router/route.js:131:13) at Route.dispatch (/Users/me/http/MyWebSite/matcha/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/Users/me/http/MyWebSite/matcha/node_modules/express/lib/router/layer.js:95:5) at /Users/me/http/MyWebSite/matcha/node_modules/express/lib/router/index.js:277:22 code: 'PROTOCOL_SEQUENCE_TIMEOUT', fatal: true, timeout: 10000 } 

这是我的createPool函数:

 module.exports = mysql.createPool({ connectionLimit: 100, host: 'localhost', port: 8080, user: 'me', password: ''}); 

我尝试了和不用密码,在不同的端口。 我发现有关节点4.2版本的一些问题,但我使用7.4.0