[Release] MySQL Async Library - 3.3.2


how can I solved it?

You can’t solve this, it’s just a warning.

Have you found a fix yet?

No, I’m sorry!

Hi @zr0iq,

After migrating to new hardware and creating a dedicated container to run MariaDB (on the same private network), I’m having a strange issue where no queries are initially ran unless there is some form of connection to the server, whether it being simply pinging the servers info.json file or connecting to the server.

This is not a problem on live servers considering people spam to get in whenever the server is online so there is always a connection/ping to make it effectively ‘wake up’ straight away, though, if a connection hasn’t been made in some time it will ultimately error and never connect.

Here’s an example of what’s going on:
asciicast
(https://asciinema.org/a/QaAabT6tOtX76zGQabl2WDwaH) - if embed fails

and here’s the full hastebin log: https://hastebin.com/inifetovob.sql

The MariaDB server is not running on the local server but is on the local network i.e 10.0.10.4 with full permissions and correct authentication details. Have not experienced this issue when the database was running local to the machine.

Any help would be appreciated as I’m losing it a little increasing timeouts and other stuff all over the place in an attempt to fix this.

@Jarrrk Does the command line also timeout when connecting to it?

Otherwise it would not be an issue with the mysql-async adapter.


@EpreeeN Several things:
a) Avoid SELECT * queries, these are always unoptimized and should only be used when you need all the data.
b) Index your queries, more here

im getting this in console and have a feeling its an easy fix, but i can not for the life of me figure it out.

[ERROR] [MySQL] An error happens on MySQL for query “UPDATE owned_vehicles SET state=true WHERE state=false {=}”: Unknown column ‘state’ in ‘where clause’

any help would be awesome

I get this error, cant seem to fix it.

set mysql_connection_string "mysql://<user>:<PW>@45.63.74.201/fivem"

set es_enableCustomData 1

add_ace resource.essentialmode command.sets allow
add_ace resource.essentialmode command.add_principal allow
add_ace resource.essentialmode command.add_ace allow

start mysql-async
start essentialmode
start esplugin_mysql

start es_extended

start esx_menu_default
start esx_menu_list
start esx_menu_dialog
1 Like

can i get help with this please

MySQL] [Slow Query Warning] [esplugin_mysql] [13696ms] SELECT * FROM users WHERE `identifier`='steam:110000106775c34';
[ERROR] [MySQL] [esplugin_mysql] An error happens on MySQL for query "[object Object]": connect ETIMEDOUT
Error: (node:22) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT
at PoolConnection.Connection._handleConnectTimeout (mysql-async.js:1009:13)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Socket.emit (events.js:208:7)
at Socket._onTimeout (net.js:422:8)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
--------------------
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 (<anonymous>)
at execute (mysql-async.js:4967:26)
at Object.global.exports [as callback] (mysql-async.js:4993:5)
at citizen:/scripting/v8/main.js:96:41
Error: (node:22) 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:22) [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.

What is this error ?

@GetShook you need to wrap your columns.
UPDATE `owned_vehicles` SET `state` = true WHERE `state` = false {=}

Which version work with ubuntu server ?


Have Same probleme you have fix ??

So when i got this error is was when i was trying to use a diffrent server to run my mysql DB. I decided to create its own on the server. Using the string
set mysql_connection_string “host=localhost;port=3306;uid=root;password=passsword;database=fivem”

If u get a password error its because u gotta change property for the newest mysql workbench to accept the script from connecting. Once u do that, it works. If ur using a linux server look up how to utilize console for mysql.

1 Like

so im on linux and have my own server mysql and have create user for my database so have this error many time try start servers have delete cache of server have try config and use lasted version of mysql async

start mysql-async
set mysql_connection_string "mysql://favelasrp2011:password@localhost/favelasrp2011"
set es_enableCustomData 1

All work have changed users MYSQL and reset users password and have used this on my config
set mysql_connection_string “host=localhost;port=3306;uid=root;password=passsword;database=fivem”

So you gotta put ur connection string first, followed by enable custom, then start async. Also use this string

set mysql_connection_string “host=localhost;port=3306;uid=root;password=passsword;database=fivem”

The other one to my knowledge doesn’t work. Also, make sure ur DB has the DB created and u uploaded the .sql file

Have you found a fix?! xD

Yes, On my server I installed a special menu called ESX AIOMenu. It did something wrong. When I installed everything again it was working. So if you installed this. Remove it from your’e server

Error: (node:560644) UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object

DO SOMONE HAVE AN IDEA?

With the new update of fivem I get this error in my console now and I get high hitch warning…

image