我试图在Gitlab上部署Adonis JS(REST)。
当作业到达以下脚本行:adonis migration:run
时,管道将失败,并显示以下错误消息:
{ Error: connect ECONNREFUSED 127.0.0.1:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1083:14)
--------------------
at Protocol._enqueue (/builds/begueradjitest/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/builds/begueradjitest/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at Connection.connect (/builds/begueradjitest/node_modules/mysql/lib/Connection.js:118:18)
at /builds/begueradjitest/node_modules/knex/lib/dialects/mysql/index.js:95:18
at Promise._execute (/builds/begueradjitest/node_modules/bluebird/js/release/debuggability.js:313:9)
at Promise._resolveFromExecutor (/builds/begueradjitest/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/builds/begueradjitest/node_modules/bluebird/js/release/promise.js:79:10)
at Client_MySQL.acquireRawConnection (/builds/begueradjitest/node_modules/knex/lib/dialects/mysql/index.js:90:12)
at create (/builds/begueradjitest/node_modules/knex/lib/client.js:280:23)
at tryPromise (/builds/begueradjitest/node_modules/tarn/lib/Pool.js:366:22)
at tryPromise (/builds/begueradjitest/node_modules/tarn/lib/utils.js:57:20)
at Promise (/builds/begueradjitest/node_modules/tarn/lib/Pool.js:366:5)
at new Promise (<anonymous>)
at callbackOrPromise (/builds/begueradjitest/node_modules/tarn/lib/Pool.js:357:10)
at Pool._create (/builds/begueradjitest/node_modules/tarn/lib/Pool.js:307:5)
at Pool._doCreate (/builds/begueradjitest/node_modules/tarn/lib/Pool.js:275:32)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 3306,
fatal: true }
我正在使用MySQL运行迁移。
我该怎么办 ?
最佳答案
您需要使用以下命令:
> node ace migration:run
阿多尼斯ACE documentation