我遵循了这个示例应用链接中提到的所有步骤。GitHub链接。运行脚本(npm run init-cloudsql)初始化 mysql 数据库时,出现以下错误:
D:\gcloud\nodejs-getting-started\2-structured-data\books\model-cloudsql.js:143
throw err;
^
Error: connect ECONNREFUSED 127.0.0.1:3306
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
--------------------
at Protocol._enqueue (D:\gcloud\nodejs-getting-started\2-structured- data\node_modules\mysql\lib\protocol\Protocol.js:145:48)
at Protocol.handshake (D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\mysql\lib\protocol\Protocol.js:52:23)
at Connection.connect (D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\mysql\lib\Connection.js:130:18)
at Connection._implyConnect (D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\mysql\lib\Connection.js:461:10)
at Connection.query (D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\mysql\lib\Connection.js:206:8)
at createSchema (D:\gcloud\nodejs-getting-started\2-structured-data\books\model-cloudsql.js:126:14)
at prompt.get (D:\gcloud\nodejs-getting-started\2-structured-data\books\model-cloudsql.js:117:5)
at D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\prompt\lib\prompt.js:336:32
at D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\utile\node_modules\async\lib\async.js:154:25
at assembler (D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\prompt\lib\prompt.js:333:9)
我错过了什么?我无法解决此错误。有人可以帮我解决这个问题吗?