我正在尝试使用nodejs运行mysql并且我安装了mysql(npm install --save mysql)并且我做了(node mysql)但出现了错误
Error: connect ECONNREFUSED 127.0.0.1:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
--------------------
at Protocol._enqueue (/Users/leejohn/Desktop/nodejs/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/Users/leejohn/Desktop/nodejs/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at Connection.connect (/Users/leejohn/Desktop/nodejs/node_modules/mysql/lib/Connection.js:116:18)
at Object.<anonymous> (/Users/leejohn/Desktop/nodejs/mysql.js:9:12)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 3306,
fatal: true
}
undefined
这有什么问题?