[Release] MySQL Async Library - 3.3.2

SCRIPT ERROR in call ref: ReferenceError: MySQL is not defined

source :
const req = "SELECT * FROM users"
const resp = MySQL.Sync.fetchAll(req)

Any idea ? :cry:

did u declare ‘@mysql-async/lib/MySQL.lua’, in server scripts? in fxmanifiest?

yes :cry: in

server_scripts {
“fishing_server.js”,
@mysql-async/lib/MySQL.lua”

}

I running in new FxServer and found this error. I using MariaDB 10.5.5

My connect string: set mysql_connection_string "user=root;database=aurora;password=123456"

anyone can help me fix it?

oops, i guess it converts the password to a number. Use a different type of connection string.

1 Like

thanks man, after i change password and it working.

image
help with this error please :frowning:

2 Likes

onMySQLReady not working on 3.3.2 ?
it isnt’ work with script call

if i use 3.3.1 it work fine with script

Anyone could help me??

not really sure what info you are wanting since I provided the only thing the console is showing. im using the most current version of HeidiSQL

how can i fix that retard warnig sql

Having the same error. Nobody apparently wants to help anyone now. We are all supposed to be professional programmers since the others on here already know how to do it.

Guys the info you provide is very poor. By just throwing us the error code you just make us ask 10 more questions to even try to give you an advice.

Anyway. Possible workarounds:

  • change your mysql connection string in server.cfg to something like that:

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

  • make sure you use localhost and your credentials are correct.

  • try a different mysql-async version.

Optimize your tables.

1 Like

Check your db connection string, enter correct credentials and try again. All the errors you see are related because there is no connection with the sql database.

Having this issue, Anyone know a fix?

Literally. Not an issue.

@zr0iq You might want to update the link for downloading the library. It’s still pointing towards 3.3.1 - unless that’s on purpose of course.

With new artifact server files have this problem. So use older version and your async will work

there is isn’t any way to set the parameters to like this:

set mysql_connection_string "server=0.0.0.0;database=*.*;userid=user;password=pwd;"

for load all the databases in my server, or what i should do, cuz i use more than 1 database at time, so i need a quick reply to continue the development of the server, thx