Docs

SQL

A fast MySQL / MariaDB engine for FiveM with a full management panel in game. Scripts written for oxmysql run on it without any change.

Server sideESXQBCoreQbox

What you get

  • A drop-in engine. Your scripts keep their oxmysql, mysql-async and ghmattimysql calls. Nothing in them needs editing. See Installation.
  • A panel in game. Type /sqlmenu to see live numbers for every script, slow queries, errors and the queries themselves. See The panel.
  • Smart alerts. waw-sql points out scripts that use the database badly: queries in a loop, one query per row, values written into the SQL, scripts flooding the database. See Smart alerts.
  • Player data and an audit log. Look up everything the database holds about a player, fix a value, and roll a player back to an earlier moment. See Player data & audit log.
  • Backups. Manual and automatic backups taken without stopping the server, a look inside any backup, and restores table by table. See Backups.
  • Cleanup rules. Old rows in log tables are deleted every night, after a backup. See Cleanup rules.
  • A Discord log. Problems, backups and every change an admin makes in the panel go to a Discord channel. See Discord log.
  • Suggestions. The optimizer proposes missing indexes and other fixes you can apply, and undo, with one click. See Suggestions.
  • Permissions. Decide exactly who may see and do what in the panel. See Who may do what.

Requirements

  • An FXServer build with Node.js 22. The engine runs on Node.js 22, so a server build that does not offer it cannot start waw-sql. waw-sql is developed and tested on server build 17000. Your build is the last number of the version the server console shows when it starts (v1.0.0.17000). If yours is older, download newer server files (artifacts) from runtime.fivem.net/artifacts and replace the old ones.
  • MariaDB. waw-sql is developed and tested on MariaDB 12. MySQL 8 and older MariaDB versions have not been tested yet. Once waw-sql runs, the console shows your version in the line Connected to ...-MariaDB.
New to running a server?

Start with Connecting your database, then follow Installation.

For developers

Everything that works with oxmysql works here. On top of that, waw-sql adds a cache, a write queue, schema versions, and exports and events for your own scripts. Start with The Lua library.

Third-party software

waw-sql bundles mysql2 and its dependencies (MIT / Apache-2.0), and the Inter font for the panel (SIL Open Font License 1.1, html/fonts/OFL-Inter.txt). See THIRD_PARTY_LICENSES.txt in the resource.