FiveM resource for connecting to MySQL database.
- Async mode only
- Based on latest* Async MySQL Connector for .NET and .NET Core
- Highly compatible with existing MySQL Async Library
- Nothing extra
- Download and put into
resources/
folder - Add
ensure vSql
toserver.cfg
- Add
set mysql_connection_string "server=localhost;database=db;userid=user;password=pwd"
toserver.cfg
- Add
server_script "@vSql/vSql.lua"
to__resource.lua
vSql.Async.execute(query, parameters, callback)
vSql.Async.transaction(queries, parameters, callback)
vSql.Async.fetchScalar(query, parameters, callback)
vSql.Async.fetchAll(query, parameters, callback)