我從CSGO roullete.when IM腳本嘗試運行它給我這個錯誤錯誤EADDRINUSE和ECONNREFUSED與腳本
errno: 'ECONNREFUSED',
syscall: 'connect',
address: 'XXX.XX.XXX.XX',
port: 3306,
fatal: true }
Error: connect ECONNREFUSED XXX.XX.XXX.XX:3306
at Object.exports._errnoException (util.js:890:11)
at exports._exceptionWithHostPort (util.js:913:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)
--------------------
at Protocol._enqueue (/root/node_modules/mysql/lib/protocol/Protocol.js:141:48)
at Protocol.handshake (/root/node_modules/mysql/lib/protocol/Protocol.js:52:41)
at PoolConnection.connect (/root/node_modules/mysql/lib/Connection.js:123:18)
at Pool.getConnection (/root/node_modules/mysql/lib/Pool.js:45:23)
at query (/var/www/html/Bot/BOT/site.js:595:7)
at load (/var/www/html/Bot/BOT/site.js:607:2)
at Object.<anonymous> (/var/www/html/Bot/BOT/site.js:59:1)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
我有VPS與Ubuntu 15.10
@Update 現在Mysql的工作不錯,但如果我想啓動這個腳本,我得到了這個錯誤。
[Error: listen EADDRINUSE :::8080]
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '::',
port: 8080 }
Error: listen EADDRINUSE :::8080
at Object.exports._errnoException (util.js:890:11)
at exports._exceptionWithHostPort (util.js:913:20)
at Server._listen2 (net.js:1234:14)
at listen (net.js:1270:10)
at Server.listen (net.js:1366:5)
at Server.listen.Server.attach (/root/node_modules/socket.io/lib/index.js:216:9)
at Timeout._onTimeout (/var/www/html/Bot/BOT/site.js:618:29)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5)
看起來像腳本無法連接,端口和地址是否正確? –
檢查您的數據庫配置(主機,dbname,用戶身份驗證..) –
對於ECONNREFUSED。閱讀http://stackoverflow.com/questions/21206801/node-js-mysql-error-econnrefused – Paul