我已经为此苦苦挣扎了几天,无法弄清楚出了什么问题。
我在用:
-node.js 0.10.4
-mysql 5.5.29
-node mysql 2.0.0.alpha7
-node sequelize 1.6.0
当我尝试执行任何查询时,我会在其中某处收到一条带有 ENOENT 的错误消息。根据我的研究,这似乎是文件系统问题的通用节点错误消息,例如文件不存在或权限不足。我已检查并且我的凭据是正确的。所以,我的创建语句失败,然后当我的应用程序去查询数据库时,没有表存在,我得到类似的东西:
Error: connect ENOENT
at errnoException (net.js:883:11)
at Object.afterConnect [as oncomplete] (net.js:874:19)
--------------------
at Handshake.Sequence (/home/greg/snipit/node_modules/mysql/lib/protocol/sequences/Sequence.js:15:21)
at new Handshake (/home/greg/snipit/node_modules/mysql/lib/protocol/sequences/Handshake.js:9:12)
at Protocol.handshake (/home/greg/snipit/node_modules/mysql/lib/protocol/Protocol.js:41:50)
at Connection.connect (/home/greg/snipit/node_modules/mysql/lib/Connection.js:63:18)
at Connection._implyConnect (/home/greg/snipit/node_modules/mysql/lib/Connection.js:162:10)
at Connection.query (/home/greg/snipit/node_modules/mysql/lib/Connection.js:88:8)
at module.exports.connect (/home/greg/snipit/node_modules/sequelize/lib/dialects/mysql/connector-manager.js:247:16)
at Object.pool.Pooling.Pool.create (/home/greg/snipit/node_modules/sequelize/lib/dialects/mysql/connector-manager.js:111:19)
at dispense (/home/greg/snipit/node_modules/sequelize/node_modules/generic-pool/lib/generic-pool.js:216:17)
at Object.me.acquire (/home/greg/snipit/node_modules/sequelize/node_modules/generic-pool/lib/generic-pool.js:260:5)
什么类型的事情通常会导致这种情况?非常感谢。