[Release] MySQL Async Library - 3.3.2

I’ve been searching for a while now and been trying a bit of everything (Syncing the certs, updating mono to beta version) however I can’t find a resolution to the issue. You got any other ideas?

Hi and GG for this release ! It’s very usefull to have a workaround with couchDB !

So, all this code is OK and work’s fine with Windows (on local on my computer) but with Ubuntu (on VPS), I have this following error :

System.IO.FileNotFoundException: Unable to find the specified file.
  at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <d7e663f2f7cd4ab6929018ec5233f09d>:0
  at (wrapper cominterop) CitizenFX.Core.IScriptHost:OpenHostFile (string)
  at (wrapper cominterop-invoke) CitizenFX.Core.IScriptHost:OpenHostFile (string)
  at CitizenFX.Core.MonoScriptRuntime.LoadFile (System.String scriptFile) [0x00007] in /src/code/client/clrcore/MonoScriptRuntime.cs:91
Failed to load script MySQLAsync.net.dll.
Started resource mysql-async
Started resource ragdoll
Stopping resource sessionmanager
Started resource sessionmanager
cfx> Resolved live-internal.fivem.net:30110 to 151.80.44.223:30110
Sending heartbeat to live-internal.fivem.net:30110
Started resource fivem-map-skater
Started map fivem-map-skater
Error running system event handling function for resource mysql-async: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: citizen:/scripting/lua/scheduler.lua:394: No such export mysql_configure in resource mysql-async
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:394: in metamethod '__index'
        lib/MySQL.lua:37: in method 'init'
        lib/init.lua:3: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:124: in function <citizen:/scripting/lua/scheduler.lua:123>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:39: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:123: in function <citizen:/scripting/lua/scheduler.lua:92>

Unable to find the specified file” means that’s my environmnt which is bad. Someone tried this resource on Linux ?

Secondly, I’m trying to use EssentialMode4 and es_rp. I have to change all couchDB requests for mysql-async requests or the king Brouznouf handles all the couchDB requests in his resource ?

Thanks a lot,

Regards,

Stan Baumer

Unfortunetaly no :confused:

“Unable to find the specified file” means that’s my environmnt which is bad. Someone tried this resource on Linux ?

There was a bug in the file name (case problem) use the beta 6.

To reply to myself to the second point

“Secondly, I’m trying to use EssentialMode4 and es_rp. I have to change all couchDB requests for mysql-async requests or the king Brouznouf handles all the couchDB requests in his resource ?”

We just have to use this code provided by @Kanersps : [Release] EssentialMode base

Thank you a lot Brouznouf !

I fixed my issue.

I installed Debian 9 instead of Centos 7, this seems to have solved my issue. I assume it’s related to the new mono version because Debian uses a older version of mono by default.

First of all, sorry for my English,
I need help, I followed all the installation steps the police system even works. But these do not give error on command line require "resources/mysql-async/lib/mysql As shown in print
I added the command line server_script ‘@ mysql-async / lib / MySQL.lua’ to all _resources But even then does this error anyone know why?

https://github.com/brouznouf/fivem-mysql-async/blob/master/UPGRADING.md

I’m not sure if this has been mentioned yet, but if you’re having problems using mysql-async on Linux (as I have), and getting tls/ssl errors, try adding sslmode=none to the connection convar. It wouldn’t work without it.

set mysql_connection_string "server=127.0.0.1;port=3306;sslmode=none;database=database_name;userid=root;password=xxxxxxxx"

Thanks for the answer! I have done the procedure that you told me, I removed the line from the “Required” script only as it is happening in the print I took, it is giving “Global Error MySQL”. I have a doubt, in MySQL Open have to put the address of the DataBase MySQl or CouchDB?
I have to put the user and password of MySQl or CouchDB, as they are different. CouchDB: “KiKoZl” “1563” MySQL: “root” “No password”

Silly question but does this need to be in the server.cfg

Start mysql-async

I know i don’t do it for my CitizenMP server and works fine, just wondering if FX is any different.

Thanks.

I feel like im doing somthing terribly wrong here :frowning:

just get this error when im using a command not sure if its a cop script issue or Async :S

Yes you do. But be sure to start Async before the essential mode

I have the same problem with @KIKoZiI

If we can no longer use this code:

Require "resources / [essential] / es_extended / lib / MySQL"
MySQL: open ("127.0.0.1", "XXXXXXX", "user", "password")

How do we get the script to connect to the database and read the codes that use this require ??

I`m Use FXServer

Require doesn’t exist anymore. Anything that uses it needs to be patched.

When you say it needs to be fixed does it mean that we need to remove the “required” line from the right scripts? If that’s what I did and the error continues

It is much easier to give the answer than it is to say obvious things. Who really knows the answer to my question please help me. Thank you.

https://wiki.fivem.net/wiki/Running_FXServer

If you read the porting notes it talks about require not being used anymore for FX Server.

There is also a snippet in the first post about require not being used anymore in FX server.

If you read the instructions for the async library which are kinda confusing if you’re not sure what you’re doing you need to use this in your resource that’s using async.

server_script '@mysql-async/lib/MySQL.lua'

Also in your server.cfg you need to set this convar.

set mysql_connection_string "server=127.0.0.01;database=gta5_gamemode_essential;userid=root;password=1202"

Make sure you also “start mysql-async”

1 Like

I’m having some issues with either ES or mysql-async, I’m not sure at all which one. I followed the steps to setup both ES and mysql-async, and have backtracked to check if I did something wrong and I really can’t find anything out of place. The first thing I noticed that I found weird is that right after my server initializes mysql-async it prints “false” in the console.
false
The server doesn’t display any errors on startup. But when someone joins the server, that’s when it spits out some errors:
join errors
Also whenever anyone joins the server it creates a new entry in the users table, even if it was already existing. Here’s the users table after I joined the server 5 times:
db spam
This is how my server.cfg looks like:

I put “essentialmode” as database because that’s the database that the SQL file bundled with esplugin_mysql created. Is this wrong?

The user and password are also correct. That’s what I use to login on MySQL Workbench.

Sorry for the long post but I have been trying for some hours now to see where I went wrong but have reached no conclusion. Thank you.

can someone add me on discord and be my dev this is so hard! Acentrix#4327