HeidiSQL, hands on
You already wrote SQL in sql-from-zero and queried from Lua in oxmysql-crud. Those lessons talked to the database through code. This one opens the same database with your own eyes. HeidiSQL is the free GUI that lets you connect to MariaDB, create databases, run a resource's schema file, and stare straight at the rows a script saved. By the end you will open a session, create a fivem database, run a .sql, and watch a players table fill up with the exact data your server wrote.
The panel layout
Before you click anything, learn the map. When HeidiSQL launches it does not drop you straight into a database. It opens the Session Manager first, a dialog that holds your saved connections. You pick or create a session, hit Open, and only then does the main window appear.
The main window has three regions. Lock these names in now, because the rest of the lesson points at them constantly.
- LEFT: the database and table tree. The top node is the server you connected to (
127.0.0.1). Under it sit your databases, and under each database its tables, views, routines, triggers, and events. This is your map of everything on the server. You right-click nodes here to create things, and you single-click a table here to select it. - CENTER: the tabbed workspace. Tabs across the top switch what the center shows. The two you live in are the Query tab (an SQL editor on top, a result grid below) and the Data tab (a grid of a table's actual rows you can read and edit).
- TOP and BOTTOM: chrome. The menu bar (File, Edit, Search, Tools, Go to, Help) and the icon toolbar with the blue play button sit on top. The SQL log and status bar sit on the bottom and tell you the last query that ran, how many rows it touched, and how long it took.
That is the whole tool. Three regions, two tabs you actually use. Everything below is just clicking around this map on purpose.
Keep reading the full lesson
Sign in to start, then unlock every step of this lesson and the full FiveM School with a membership.
- Build it
- How it works
- Common mistakes
- What you can do now
- Try it yourself
The remainder of HeidiSQL hands-on is available to FiveM School members.