MySQL with essentials extended not working as intended

Recently, I was adding resources to my server, and when i was trying to get all of the Essentials and extended working, I came across errors with MySQL, which is as follows:

[ERROR] connect ECONNREFUSED 127.0.0.1:3306
[ERROR] [MySQL] [es_extended] An error happens on MySQL for query “SELECT * FROM jobs”: connect ECONNREFUSED 127.0.0.1:3306
[ERROR] [MySQL] [es_extended] An error happens on MySQL for query “SELECT * FROM items”: connect ECONNREFUSED 127.0.0.1:3306
Error: (node:19160) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
--------------------
at Protocol._enqueue (mysql-async.js:6149:48)
at Protocol.handshake (mysql-async.js:6056:23)
at PoolConnection.connect (mysql-async.js:711:18)
at Pool.getConnection (mysql-async.js:4759:16)
at Pool.query (mysql-async.js:4913:8)
at Promise (mysql-async.js:5220:10)
at new Promise ()
at MySQL.execute (mysql-async.js:5216:26)
at Object.global.exports [as callback] (mysql-async.js:5109:9)
at citizen:/scripting/v8/main.js:96:41
Error: (node:19160) 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:19160) [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:19160) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
--------------------
at Protocol._enqueue (mysql-async.js:6149:48)
at Protocol.handshake (mysql-async.js:6056:23)
at PoolConnection.connect (mysql-async.js:711:18)
at Pool.getConnection (mysql-async.js:4759:16)
at Pool.query (mysql-async.js:4913:8)
at Promise (mysql-async.js:5220:10)
at new Promise ()
at MySQL.execute (mysql-async.js:5216:26)
at Object.global.exports [as callback] (mysql-async.js:5109:9)
at citizen:/scripting/v8/main.js:96:41
Error: (node:19160) 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)

I was trying to get it to connect the database to my server, and I figured that since I had set it up, and since I was able to get this far by following tutorials, that it would be worth however long this takes to fix, but my server now won’t start up without this.

Hello, this is a friendly reminder because this is your first time creating a topic (or it has been a while since your last topic) in this category.

Please note that most of the support is provided by the FiveM community on a voluntary basis. We ask you to be patient; there is no guarantee we have a solution to your problem(s). To avoid unnecessary/duplicate topics, please browse the forums before creating a topic.

To improve your chances of your issue(s) being solved, please provide as much information as possible about the issue(s) you are having. Also —whenever possible— please use the template given to you when creating a topic.

Thanks for keeping these forums tidy!
:mascot:

Looks like you entered the wrong MySQL host

So, how do I fix this? I don’t have MySQL installed on my machine, could that be the problem, or is something not right in the configuration file, or is it the resource itself?

How is your server supposed to connect to a mysql server if you don’t have mysq installed

1 Like

I’m having this exact issue… I reverted to an old version of es_extended and it went away…

Error: (node:5768) UnhandledPromiseRejectionWarning: TypeError: logger.Error is not a function
    at global.on (mysql-async.js:5142:14)
    at citizen:/scripting/v8/main.js:204:28
Error: (node:5768) 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:5768) [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.

Which version did you go back to? I just used the 1.1.0 release, and don’t know what to do as this is leaving my server nonfunctional.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.