[help] No user data in mysql when I enter my server

I’ve tried many times but it didn’t work.
I download “essentialmode”,“esplugin_mysql”,“mysql-async”,and import them in the database.
I’m sure that I’ve type into server.cfg,essentialmode before esplugin_mysql,and mysql-async before essentialmode.
and set es_enableCustomData 1 I’ve done,too.

But when I start fivem and join localhost server,after the loading screen,into the game,
there’s something wrong in cmd:[Buffer_Shortage]
Imgur
And I open mysql, the table named “users” didn’t store my data
Imgur

I’ve reinstalled xampp and the server many times.
but it still didn’t work.
I really don’t know what to do next.

Share your server.cfg

Set mysql_connection_string “server=127.0.0.1;database=essentialmode;userid=root;password=”

#here defines the running port of the server
#If you want to modify the port, please replace 30120 with the port you want.
Endpoint_add_tcp “0.0.0.0:30120”
Endpoint_add_udp “0.0.0.0:30120”

#These are server plugins and will be started by default.
Start mapmanager
Start chat
Start spawnmanager
Start sessionmanager
Start fivem
Start hardcap
Start ■■■■■■■
Start scoreboard
Start playernames

Start mysql-async

Start essentialmode

Set mysql_debug false

Start esplugin_mysql
Start es_admin2

Start async
Start es_extended

Start esx_menu_default

Start esx_menu_list
Start esx_menu_dialog

Start sesx_assets

Add_ace resource.essentialmode command.add_ace allow

Add_ace resource.essentialmode command.add_principal allow

Set es_enableCustomData 1

#This option allows your players to use ScriptHook-based plugins such as Menyoo, etc.
#Setting to 0 will disable players who use the ScriptHook plugin from entering the server.
sv_scriptHookAllowed 1

#Uncomment this line will enable the RCON function of the server (Rcon is a remote management server function)
#rcon_password changeme

#Uncomment this line to let players not find your server
#sv_master1 “”

#Want to only allow players authenticated with a third-party provider like Steam?
#Don’t forget Social Club is a third party provider too!
#sv_authMaxVariance 1
#sv_authMinTrust 5

#Server’s authorization code (applied at https://keymaster.fivem.net)
Sv_licenseKey ddndxxxxxxxxxxxxxxwe4x8l2

Does the console tell you if the connection to MySQL is established?

I only ask, because this is the setup of my string:

set mysql_connection_string "server=localhost;uid=root;password="";database=fivem_main"

I always get a “MySQL Connection Established” in the console (verifying information before digging deeper)

I didn’t found this sentence,but there’s no error,either

I replace the string you give,and it brings:

Error: (node:20700) UnhandledPromiseRejectionWarning: Error: Empty mysql_connection_string detected.
at global.on (mysql-async.js:5066:49)
at citizen:/scripting/v8/main.js:204:28
Error: (node:20700) 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:20700) [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.

1 Like

Firstly…did you copy and paste the connection string I posted, or did you type it out? It appears if you copy and paste it, it will throw those types of errors.

I also did a Google search on one of your more recent errors, and found this post: [Release] MySQL Async Library - 3.2.0

Not sure if you read it all, but it might be worth looking into, over 700+ posts…

update mysql-async to 3.1, impossible to tell if the error comes from there without knowing your version.

I copy the string and paste but i change the database name,and it shows another error code.

so I use my origin string and update mysql-async to 3.1,then I see “[mysql-async] Database server connection established.”

But when i logged into the server,it still shows Buffer_Shortage in cmd.

And the “users” table in my database is still nothing.

Try to start essentialmode before mysql-async
And also ace commandes need to be put before “start essentialmode”

I’ve tried but it didn’t help.

Connecting: JasonHong
Sending heartbeat to live-internal.fivem.net:30110
server thread hitch warning: timer interval of 374 milliseconds
server thread hitch warning: timer interval of 2511 milliseconds
Error running call reference function for resource es_extended: citizen:/scripting/lua/scheduler.lua:405: @es_extended/server/main.lua:134: attempt to index a nil value (field ‘?’)
stack traceback:
@es_extended/server/main.lua:134: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:391: in function citizen:/scripting/lua/scheduler.lua:390
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:390: in function citizen:/scripting/lua/scheduler.lua:389
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:405: in function citizen:/scripting/lua/scheduler.lua:374
Error: Unhandled error in timer: Error: BUFFER_SHORTAGE
Error: BUFFER_SHORTAGE
at n.e [as reserve] (citizen:/scripting/v8/msgpack.js:29:12766)
at h (citizen:/scripting/v8/msgpack.js:29:15761)
at n.r [as decode] (citizen:/scripting/v8/msgpack.js:29:13908)
at n.fetch (citizen:/scripting/v8/msgpack.js:29:6972)
at n.u [as read] (citizen:/scripting/v8/msgpack.js:29:12076)
at Object.n [as decode] (citizen:/scripting/v8/msgpack.js:29:7097)
at unpack (citizen:/scripting/v8/main.js:20:33)
at citizen:/scripting/v8/main.js:51:20
at setImmediate (mysql-async.js:14901:7)
at Object.callback (citizen:/scripting/v8/timer.js:96:21)
server thread hitch warning: timer interval of 208 milliseconds

I don’t know if this has anything to do with the mod/script you are trying to load…or MySQL/MariaDB…would changing the following setting in MySQL/MariaDB have any effect on “BUFFER_SHORTAGE”?

innodb_buffer_pool_size

What should i do with this string?

I have no idea why it always says Buffer_Shortage…

Or does any other method I can get the user data

except esx?

it worked two weeks before,I could get the data about users who logged in.

but there were some plugins crashed.

so I delete all the server and resources and MySQL.

and yesterday I reinstalled it ,the error pop up…

You reinstalled MySQL?

yeah,just delete xampp, and reset all the database.

I create a server on another computer with another network

and do the steps from the tutorial again

but it still shows Buffer_Shortage

So it’s not the problem that I reinstall

but what issue cause it?

I’m honestly at a loss as to what it might be…have you tried reaching out to the developer of mysql-async to see if they can be of assistance?

I’m not to familiar with FiveM. My help kind of ends when it isn’t any of the applications or the OS that FiveM uses (MySQL/Windows/Linux etc…)