[Release] MySQL Async Library - 3.3.2

i am getting this error and i do not know what line i have wrong or if i need to add this progrm to my database and if that is the case how do i add this to my database and i am on linux umbutu if that changes anything

any help would be appereciated it also will not start my server with this it does not pop up on the list of servers

Most likely your mysql_connection_string convar in your server.cfg is incorrect (if it could not connect, it would tell you). What does your connection string look like?

1 Like

i do not have that in my server.cfg where should it be

nvm i found it

yea… don’t put tilts around the connection string… Why do you think you need those?
Not to mention that password is probably different than yours. I would read up about setting Convars in the FiveM’s server.cfg and how to setup a user and database in MySQL

ok and is it the password for the computer or for the dabase

Obviously the password for whatever user you are using to connect to MySQL server/database.

Again, it’s probably best for you to read up about MySQL users, how to create one for a specific database and give it a password. Use those credentials in your mysql_connection_string convar to connect

But running root/root is so much easier! /s
I think in addition to reading about convars, everyone needs to understand the gist of MySQL and databases in general. Running a FiveM server isn’t all just drag and drop, there is a good bit of understanding required.

Someone wanna help me out here, my logs are spammed with this and the server is lagging every time this happens, and it usually happens between every minute to five minutes. https://pastebin.com/nNg91aRR

I only use the standard ESX and extended that’s it and it’s requirements ofc, I understand ESX isn’t really within this topic but it seems to be an issues with the plugin itself. Not sure.

Hello,

How could I use the “last_insert_id” with this? For example:

MySQL.Async.execute(
			'INSERT INTO characters(code...)',
			{ })

How could I get the auto increment value on this? If it makes a difference, the field name is “cid”

Thanks in advance… Couldn’t find this information anywhere.

By using .insert; instead of .execute, it returns that automatically. In case you didn’t figure by now.

1 Like

Thankfully I figured this out but thanks anyways !

1 Like

Is it possible to use DB Browser for SQLite to view / write to the sql.sql database?

When opening the file with DB Browser, I’m met with an SQLCipher encryption menu asking me to enter a password which I never set (yes I tried password, PASSWORD, and the password I used to make the MySQL admin account when installing MySQL).

If no, is there any other simple database viewer that is compatible? Thanks.

Hey i got this error

`Error resuming coroutine: citizen:/scripting/lua/scheduler.lua:655: No such export mysql_sync_fetch_all in resource mysql-async
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:655: in metamethod ‘__index’
@mysql-async/lib/MySQL.lua:56: in field ‘fetchAll’
server/main.lua:24: in function ‘LoadShop’
server/main.lua:18: in function <server/main.lua:14>

Your resource has started before mysql-async. How about using the ready function?

You are awesome! So many people on these forums wanted to be smartasses or think we should know everything before coming here. There answer is always “fix it yourself”. Like mf if I could I wouldn’t be talking to your punk arse.

Your solution worked for me! Thank you SO SO much for not being a dick and posting a solution.

Hello guys, I’m getting this error:
[I know this is not the Async resource from this thread but it does EXACTLY the same with the Async from this thread. Any insight is appreciated.

INFO: No channel links found in configuration file.
Found new resource async in W:/FiveM/resources//async
Found new resource cron in W:/FiveM/resources//cron
Resolved live-internal.fivem.net:30110 to 62.210.162.18:30110
Found new resource esplugin_mysql in W:/FiveM/resources//esplugin_mysql
Found new resource essentialmode in W:/FiveM/resources//essentialmode
Found new resource esx_addonaccount in W:/FiveM/resources//esx_addonaccount
Found new resource esx_addoninventory in W:/FiveM/resources//esx_addoninventory
Found new resource esx_billing in W:/FiveM/resources//esx_billing
Found new resource esx_datastore in W:/FiveM/resources//esx_datastore
Found new resource esx_property in W:/FiveM/resources//esx_property
Found new resource esx_society in W:/FiveM/resources//esx_society
Found new resource esx_vehicleshop in W:/FiveM/resources//esx_vehicleshop
Found new resource es_admin2 in W:/FiveM/resources//es_admin2
Found new resource es_extended in W:/FiveM/resources//es_extended
Found new resource fivem in W:/FiveM/resources//fivem
Found new resource fivem-awesome1501 in W:/FiveM/resources//fivem-awesome1501
Found new resource fivem-map-hipster in W:/FiveM/resources//fivem-map-hipster
Found new resource fivem-map-skater in W:/FiveM/resources//fivem-map-skater
Found new resource frfuel in W:/FiveM/resources//frfuel
Found new resource GHMattiMySQL in W:/FiveM/resources//GHMattiMySQL
Found new resource instance in W:/FiveM/resources//instance
Found new resource LockSystem3.1 in W:/FiveM/resources//LockSystem3.1
Found new resource mysql-async in W:/FiveM/resources//mysql-async
Found new resource runcode in W:/FiveM/resources//runcode
Found new resource salty_vehicleblackout in W:/FiveM/resources//salty_vehicleblackout
Found new resource race in W:/FiveM/resources//[gamemodes]/race
Found new resource race-test in W:/FiveM/resources//[gamemodes]/race-test
Found new resource channelfeed in W:/FiveM/resources//[gameplay]/channelfeed
Found new resource irc in W:/FiveM/resources//[gameplay]/irc
Found new resource obituary in W:/FiveM/resources//[gameplay]/obituary
Found new resource obituary-deaths in W:/FiveM/resources//[gameplay]/obituary-deaths
Found new resource playernames in W:/FiveM/resources//[gameplay]/playernames
Found new resource mapmanager in W:/FiveM/resources//[managers]/mapmanager
Found new resource baseevents in W:/FiveM/resources//[system]/baseevents
Found new resource chat in W:/FiveM/resources//[system]/chat
Found new resource hardcap in W:/FiveM/resources//[system]/hardcap
Found new resource ■■■■■■■ in W:/FiveM/resources//[system]/■■■■■■■
Found new resource scoreboard in W:/FiveM/resources//[system]/scoreboard
Found new resource sessionmanager in W:/FiveM/resources//[system]/sessionmanager
Found new resource spawnmanager in W:/FiveM/resources//[system]/spawnmanager
Found new resource betaguns in W:/FiveM/resources//[test]/betaguns
Found new resource gameInit in W:/FiveM/resources//[test]/gameInit
Found new resource keks in W:/FiveM/resources//[test]/keks
Found new resource yarn in W:/FiveM/resources//[system]/[builders]/yarn
Started resource sessionmanager
Started resource mapmanager
Started resource chat
Started resource spawnmanager
Started resource scoreboard
Started gametype Freeroam
Started resource fivem
Started resource hardcap
Started resource ■■■■■■■
Loaded GHMattiMySQL.net, Version=0.6.1.0, Culture=neutral, PublicKeyToken=null into ScriptDomain_1345966644
Loaded MySqlConnector, Version=0.38.0.0, Culture=neutral, PublicKeyToken=d33d3e53aa5f8c92 into ScriptDomain_1345966644
Instantiated instance of script GHMattiMySQL.Core.
Started resource GHMattiMySQL
Started resource essentialmode
Started resource esplugin_mysql
Started resource es_admin2
Loaded MySQLAsync.net, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null into ScriptDomain_1185739870
Instantiated instance of script MySQLAsync.MySQLAsync.
Started resource mysql-async
Started resource async
Started resource baseevents
Started resource es_extended
Authenticating server license key…
Server license key authentication succeeded. Welcome!
cfx> Sending heartbeat to live-internal.fivem.net:30110

Current version: 5.0.2
Updater version: 5.0.2

Everything is fine!

Started map fivem-map-hipster
Started resource fivem-map-hipster
Loaded MySqlConnector, Version=0.26.0.0, Culture=neutral, PublicKeyToken=null into ScriptDomain_1185739870
hitch warning: frame time of 278 milliseconds
Loaded System.Threading.Tasks.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 into ScriptDomain_1345966644
Loaded System.Threading.Tasks.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 into ScriptDomain_1185739870
error in mono_error_set_method_load: Could not find method with signature string,string

Loaded System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 into ScriptDomain_1345966644
error in mono_error_set_method_load: Could not find method with signature string,string

[ERROR] [MySQL] An critical error happens on MySQL for query “SELECT * FROM items {=}”: Method ‘System.Security.Cryptography.X509Certificates.X509Certificate2…ctor’ not found. at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x0002c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at MySql.Data.Serialization.MySqlSession.InitSslAsync (MySql.Data.Serialization.ProtocolCapabilities serverCapabilities, MySql.Data.Serialization.ConnectionSettings cs, MySql.Data.Protocol.Serialization.IOBehavior ioBehavior, System.Threading.CancellationToken cancellationToken) [0x00044] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
at MySql.Data.Serialization.MySqlSession+d__49.MoveNext () [0x003da] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at MySql.Data.MySqlClient.ConnectionPool+d__0.MoveNext () [0x00467] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at MySql.Data.MySqlClient.MySqlConnection+<CreateSessionAsync>d__68.MoveNext () [0x00102] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at MySql.Data.MySqlClient.MySqlConnection+d__19.MoveNext () [0x000cb] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at MySQLAsync.Operation`1+d__3[TResult].MoveNext () [0x000aa] in <6b79789832b34a31961dbb39358e1b3f>:0
hitch warning: frame time of 365 milliseconds

Hey, I have the same problem did you manage to get a fix?

To cross reference from some other threads on resolving this ssl issue:

add sslmode=none to the connection string.

i.e.

set mysql_connection_string "server=127.0.0.1;database=gta5_gamemode_essential;userid=myusername;password=1202;sslmode=none"

1 Like