我的情况类似于-包坏了。got:80预期:0 node.js(无解决方案)。在本地计算机上正常工作,但在虚拟机上失败。
代码如下:
var connection = mysql.createConnection({
host : "xxxxx",
port : 22,
user : "root",
password : "root",
database : "db"
});
错误如下:
错误:数据包顺序错误。在socket处的protocol.write(/home/webdev/pm/lt/node\u modules/mysql/lib/protocol/parser.js:42:19)处应为0(/home/webdev/pm/lt/node\u modules/mysql/lib/connection.js:103:28)在emitone(events.js:116:13)在socket.emit(events.js:211:7)在addchunk(\u stream\u readable.js:263:12)在readableaddchunk(\u stream\u readable.js:250:11)在socket.readable.push(\u stream\u readable.js:208:10)在tcp.onread(net.js:607:20)在protocol.\u排队(/home/webdev/pm/lt/node\u modules/mysql/lib/protocol/protocol.js:145:48)at protocol.handshake(/home/webdev/pm/lt/node\u modules/mysql/lib/protocol/protocol.js:52:23)at connection.connect(/home/webdev/pm/lt/server.js:1147:13)at layer.handle[作为handle\u请求](/home/webdev/pm/lt/node\u modules/express/lib/router/layer.js:76:5)在route.dispatch(/home/webdev/pm/lt/node\u modules/express/lib/router/route.js:100:13)在layer.handle[作为handle\u请求](/home/webdev/pm/lt/node\u modules/express/lib/router/layer.js:76:5)在/home/webdev/pm/lt/node_modules/express/lib/router/index.js:234:24在function.proto.process_params(/home/webdev/pm/lt/node_modules/express/lib/router/index.js:312:12)
由于这个错误,我为一个客户所做的工作陷于停顿,因此请求尽早解决。谢谢您。
暂无答案!
目前还没有任何答案,快来回答吧!