I need help with my FiveM server. I dont know how to fix this!

I have these errors occurring when I run my server starter. Im not sure how to fix this:

Warning: onesync_enabled is deprecated. Please use onesync legacy instead.

and:

[mysql-async] [ERROR] connect ECONNREFUSED 127.0.0.1:3306
[MySQL] [WARNING] [esx_joblisting] [2060ms] SELECT name, label FROM jobs WHERE whitelisted = ? : [false]
[MySQL] [ERROR] [esx_joblisting] An error happens for query “SELECT name, label FROM jobs WHERE whitelisted = ? : [false]”: connect ECONNREFUSED 127.0.0.1:3306
[MySQL] [WARNING] [esx_addonaccount] [2082ms] SELECT * FROM addon_account : []
[MySQL] [ERROR] [esx_addonaccount] An error happens for query “SELECT * FROM addon_account : []”: connect ECONNREFUSED 127.0.0.1:3306
[MySQL] [WARNING] [esx_shops] [2060ms] SELECT * FROM shops LEFT JOIN items ON items.name = shops.item : []
[MySQL] [ERROR] [esx_shops] An error happens for query “SELECT * FROM shops LEFT JOIN items ON items.name = shops.item : []”: connect ECONNREFUSED 127.0.0.1:3306
[MySQL] [WARNING] [esx_addoninventory] [2063ms] SELECT * FROM items : []
[MySQL] [ERROR] [esx_addoninventory] An error happens for query “SELECT * FROM items : []”: connect ECONNREFUSED 127.0.0.1:3306
[MySQL] [WARNING] [esx_society] [2060ms] SELECT * FROM jobs : []
[MySQL] [ERROR] [esx_society] An error happens for query “SELECT * FROM jobs : []”: connect ECONNREFUSED 127.0.0.1:3306
[MySQL] [WARNING] [es_extended] [2059ms] SELECT * FROM jobs : []
[MySQL] [ERROR] [es_extended] An error happens for query “SELECT * FROM jobs : []”: connect ECONNREFUSED 127.0.0.1:3306
[MySQL] [WARNING] [esx_datastore] [2063ms] SELECT * FROM datastore : []
[MySQL] [ERROR] [esx_datastore] An error happens for query “SELECT * FROM datastore : []”: connect ECONNREFUSED 127.0.0.1:3306
[MySQL] [WARNING] [es_extended] [2060ms] SELECT * FROM items : []
[MySQL] [ERROR] [es_extended] An error happens for query “SELECT * FROM items : []”: connect ECONNREFUSED 127.0.0.1:3306
SCRIPT ERROR: @esx_joblisting/server/main.lua:10: attempt to get length of a nil value (local ‘result’)

ref (@esx_joblisting/server/main.lua:10)
(@mysql-async/mysql-async.js:15543)
SCRIPT ERROR: @esx_addonaccount/server/main.lua:9: attempt to get length of a nil value (local ‘result’)
fn (@mysql-async/lib/MySQL.lua:226)
SCRIPT ERROR: @esx_addoninventory/server/main.lua:10: attempt to get length of a nil value (local ‘items’)
fn (@mysql-async/lib/MySQL.lua:226)
SCRIPT ERROR: @esx_datastore/server/main.lua:9: attempt to get length of a nil value (local ‘result’)
fn (@mysql-async/lib/MySQL.lua:226)
SCRIPT ERROR: @esx_society/server/main.lua:18: attempt to get length of a nil value (local ‘result’)
fn (@mysql-async/lib/MySQL.lua:226)

2 Likes

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 Cfx.re 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:

The connection you’re trying to establish is refusing, Meaning something is incorrect or missing.
Double check that your server/user/password and database are correct.

and I check this in my server.cfg file right?

1 Like

like I dont recall setting a password etc for my server

set mysql_connection_string “server=localhost;uid=root;password=;database=es_extended;charset=utf8mb4”

Something like this in your server.cfg

1 Like

Can I just put any password there or do I need to get a password from somewhere? Sorry im just new to this.

2 Likes

If you dont have a password leave it empty like it is.

Can i copy that and paste it into my server.cfg file?

You can as long as it matches your database name.

1 Like

I also have another error now saying Mysql-async error ER_BAD_DB_ERROR: Unknown database “fivem”

Means your “fivem” database doesnt exist.

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