I need Help [Error: connect ECONNREFUSED ]

I have try to start my Server but i become this error can you help me?

Error: (node:689) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 134.255.218.159:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
--------------------
at Protocol._enqueue (mysql-async.js:5807:48)
at Protocol.handshake (mysql-async.js:5714:23)
at PoolConnection.connect (mysql-async.js:720:18)
at Pool.getConnection (mysql-async.js:4577:16)
at Pool.query (mysql-async.js:4731:8)
at Promise (mysql-async.js:4970:12)
at new Promise ()
at execute (mysql-async.js:4967:26)
at Object.global.exports [as callback] (mysql-async.js:4993:5)
at citizen:/scripting/v8/main.js:87:41
Error: (node:689) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Error: (node:689) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Error: (node:689) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: unexpected PromiseRejectEvent
at process. (internal/process/promises.js:27:25)
at
at Query.db.query [as _callback] (mysql-async.js:4973:13)
at Query.Sequence.end (mysql-async.js:280:24)
at mysql-async.js:4734:13
at Handshake.onConnect [as _callback] (mysql-async.js:4587:9)
at Handshake.Sequence.end (mysql-async.js:280:24)
at Protocol.handleNetworkError (mysql-async.js:6025:14)
at PoolConnection.Connection._handleNetworkError (mysql-async.js:1018:18)
at emitOne (events.js:116:13)
Error: (node:689) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
Error: (node:689) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 134.255.218.159:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
--------------------
at Protocol._enqueue (mysql-async.js:5807:48)
at Protocol.handshake (mysql-async.js:5714:23)
at PoolConnection.connect (mysql-async.js:720:18)
at Pool.getConnection (mysql-async.js:4577:16)
at Pool.query (mysql-async.js:4731:8)
at Promise (mysql-async.js:4970:12)
at new Promise ()
at execute (mysql-async.js:4967:26)
at Object.global.exports [as callback] (mysql-async.js:4993:5)
at citizen:/scripting/v8/main.js:87:41
Error: (node:689) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated eitcfx> her by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
[MySQL] [Slow Query Warning] [esx_shops] [1366ms] SELECT * FROM shops LEFT JOIN items ON items.name = shops.item
[ERROR] [MySQL] [esx_shops] An error happens on MySQL for query β€œ[object Object]”: connect ECONNREFUSED 134.255.218.159:3306
[MySQL] [Slow Query Warning] [esx_addonaccount] [1365ms] SELECT * FROM addon_account
[ERROR] [MySQL] [esx_addonaccount] An error happens on MySQL for query β€œ[object Object]”: connect ECONNREFUSED 134.255.218.159:3306
Error: (node:689) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 134.255.218.159:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
--------------------
at Protocol._enqueue (mysql-async.js:5807:48)
at Protocol.handshake (mysql-async.js:5714:23)
at PoolConnection.connect (mysql-async.js:720:18)
at Pool.getConnection (mysql-async.js:4577:16)
at Pool.query (mysql-async.js:4731:8)
at Promise (mysql-async.js:4970:12)
at new Promise ()
at execute (mysql-async.js:4967:26)
at Object.global.exports [as callback] (mysql-async.js:4993:5)
at citizen:/scripting/v8/main.js:87:41
Error: (node:689) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
Error: (node:689) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: unexpected PromiseRejectEvent
at process. (internal/process/promises.js:27:25)
at
at Query.db.query [as _callback] (mysql-async.js:4973:13)
at Query.Sequence.end (mysql-async.js:280:24)
at mysql-async.js:4734:13
at Handshake.onConnect [as _callback] (mysql-async.js:4587:9)
at Handshake.Sequence.end (mysql-async.js:280:24)
at Protocol.handleNetworkError (mysql-async.js:6025:14)
at PoolConnection.Connection._handleNetworkError (mysql-async.js:1018:18)
at emitOne (events.js:116:13)
Error: (node:689) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
Error: (node:689) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 134.255.218.159:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
--------------------
at Protocol._enqueue (mysql-async.js:5807:48)
at Protocol.handshake (mysql-async.js:5714:23)
at PoolConnection.connect (mysql-async.js:720:18)
at Pool.getConnection (mysql-async.js:4577:16)
at Pool.query (mysql-async.js:4731:8)
at Promise (mysql-async.js:4970:12)
at new Promise ()
at execute (mysql-async.js:4967:26)
at Object.global.exports [as callback] (mysql-async.js:4993:5)
at citizen:/scripting/v8/main.js:87:41
Error: (node:689) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
[MySQL] [Slow Query Warning] [esx_addoninventory] [1364ms] SELECT * FROM items
[ERROR] [MySQL] [esx_addoninventory] An error happens on MySQL for query β€œ[object Object]”: connect ECONNREFUSED 134.255.218.159:3306
[MySQL] [Slow Query Warning] [es_extended] [1362ms] SELECT * FROM items
[ERROR] [MySQL] [es_extended] An error happens on MySQL for query β€œ[object Object]”: connect ECONNREFUSED 134.255.218.159:3306
Error: (node:689) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 134.255.218.159:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
--------------------
at Protocol._enqueue (mysql-async.js:5807:48)
at Protocol.handshake (mysql-async.js:5714:23)
at PoolConnection.connect (mysql-async.js:720:18)
at Pool.getConnection (mysql-async.js:4577:16)
at Pool.query (mysql-async.js:4731:8)
at Promise (mysql-async.js:4970:12)
at new Promise ()
at execute (mysql-async.js:4967:26)
at Object.global.exports [as callback] (mysql-async.js:4993:5)
at citizen:/scripting/v8/main.js:87:41
Error: (node:689) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7)
Error: (node:689) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 134.255.218.159:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
--------------------
at Protocol._enqueue (mysql-async.js:5807:48)
at Protocol.handshake (mysql-async.js:5714:23)
at PoolConnection.connect (mysql-async.js:720:18)
at Pool.getConnection (mysql-async.js:4577:16)
at Pool.query (mysql-async.js:4731:8)
at Promise (mysql-async.js:4970:12)
at new Promise ()
at execute (mysql-async.js:4967:26)
at Object.global.exports [as callback] (mysql-async.js:4993:5)
at citizen:/scripting/v8/main.js:87:41
Error: (node:689) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)

134.255.218.159:3306 is this the ip of your MySQL server? Maybe it should be localhost as most MySQL servers don’t listen outside.

2 Likes

I have had the same issue as the person above, and you are correct that the IP/Port is incorrect, however I am unsure of how to change the IP/Port that the code uses to attempt a connection. Do you know how? Thanks in advance :smiley:

thanks for the Help yeah my bad

I have the same issue, and when I try to put localhost, it still gives me the same problem. What do I do in this situation?

i have the same issue too. do you know how to fix it?