If you run DarkRP, an admin mod, or any addon that needs to remember data between map changes and restarts, sooner or later you will hit the same requirement: MySQLoo. It is the bridge that lets your server’s Lua code talk to a real MySQL or MariaDB database, and it is one of the most common “why won’t my addon load?” stumbling blocks for new Garry’s Mod admins. The good news is that installing it is a single-file drop — once you understand which file to download and where to put it.
This guide walks through exactly what MySQLoo is, how to pick the correct binary for your server’s operating system and branch, where to place it, the Windows prerequisite that trips up half of all installs, and how to confirm it loaded. By the end you will have a working MySQL module ready for DarkRP or any other persistence-hungry addon.
What MySQLoo Actually Is
MySQLoo is an object-oriented MySQL binary Lua module for Garry’s Mod. In plain terms, it is a compiled gmsv_* module — a chunk of native code, not a Lua script — that exposes a database API to your server-side Lua. Once it is loaded, any addon can open a connection to a MySQL/MariaDB server, run queries, and read results back.
It is popular because it does the things serious persistence needs: it supports multiple result sets, prepared queries, and transactions. That is why DarkRP money/inventory storage, many admin mods, donation/perk systems, and custom gamemodes all list MySQLoo as a dependency. If an addon’s install instructions say “requires MySQLoo,” this is the file they mean.
Because it is a compiled binary, you cannot just paste it like a Lua addon. It has to match your server’s platform exactly — and that matching is where most failed installs come from.
Step 1: Identify Your Server’s OS and Branch
MySQLoo ships as four different files. You need exactly one of them, and choosing wrong is the number-one reason the module silently fails to load. Two things decide which file you need:
- Operating system — Windows or Linux.
- Server branch / architecture — the standard
srcdsis 32-bit; there is also a 64-bit (x86-64) branch.
The standard, long-running Garry’s Mod dedicated server (srcds) is 32-bit, which means you use the win32 / linux files. If you deliberately run the x86-64 branch, you use the win64 / linux64 files. If you are not sure which branch you run, you are almost certainly on the standard 32-bit branch — most hosts default to it.
The Four Binary Names
| Platform | Branch | Filename to download |
|---|---|---|
| Windows | 32-bit (standard srcds) | gmsv_mysqloo_win32.dll |
| Windows | 64-bit (x86-64 branch) | gmsv_mysqloo_win64.dll |
| Linux | 32-bit (standard srcds) | gmsv_mysqloo_linux.dll |
| Linux | 64-bit (x86-64 branch) | gmsv_mysqloo_linux64.dll |
A detail that confuses Linux admins: the Linux files still use a .dll extension by convention even though they are Linux shared objects, not Windows libraries. Do not rename them to .so — Garry’s Mod expects the .dll name. So a 32-bit Linux server uses gmsv_mysqloo_linux.dll exactly as written.
To summarize the branch rule: standard 32-bit srcds → win32.dll or linux.dll; the 64-bit branch → win64.dll or linux64.dll. Download the single file that matches both your OS and your branch from the official FredyH/MySQLOO GitHub releases, which is the authoritative source for the module.
Step 2: Place the Binary in lua/bin/
Garry’s Mod loads binary modules from one specific folder. The file must go in:
garrysmod/lua/bin/
So the full path to a 32-bit Linux install would be:
garrysmod/lua/bin/gmsv_mysqloo_linux.dll
Important: on many fresh server installs the bin folder does not exist yet. If you open garrysmod/lua/ and there is no bin directory, create it — the spelling must be exactly bin, lowercase, directly inside lua. Upload your single gmsv_mysqloo_* file into it. You do not need any other files; MySQLoo is self-contained as one binary.
If your host provides a file manager or FTP access, this is a simple drag-and-drop. If you have shell access, you can drop it in directly. Either way, do not place it loose in garrysmod/lua/ or in an addon folder — it will not be found there.
Step 3 (Windows Only): Install the Visual C++ Redistributable
This is the single most common reason a correctly-placed Windows binary still refuses to load. MySQLoo’s Windows build depends on the Microsoft Visual C++ Redistributable runtime. If the matching redist is not installed on the machine, the module fails to load — usually with no obvious error beyond the addon that depends on it breaking.
- For a 32-bit (win32) server, install the x86 Visual C++ Redistributable.
- For a 64-bit (win64) server, install the x64 Visual C++ Redistributable.
- The commonly required version is the VC++ 2015–2019 redistributable.
If you are on a managed host, the redist is often already present — but if your Windows install is brand new or self-managed, install it before troubleshooting anything else. Linux servers do not need this step.
Step 4: Restart and Verify It Loaded
Binary modules are loaded at server startup, so you must fully restart the server after placing the file — a map change is not enough. Once it is back up, you can confirm MySQLoo is available by requiring it from the server console (or a quick Lua snippet). In server-side Lua:
require("mysqloo")
print(mysqloo) -- should print a table, not nil
print(mysqloo.VERSION)
If require("mysqloo") throws an error like “module not found,” the binary is in the wrong place, named for the wrong platform/branch, or (on Windows) the VC++ redist is missing. Work back through Steps 1–3 in that order. If it prints a table, the module is live and your addons can use it.
Connecting an Addon (DarkRP Example)
MySQLoo itself only provides the connection API — it does not store anything on its own. The addon you installed it for (DarkRP, an admin mod, a perk system) is what actually uses it. Typically you supply the database credentials in that addon’s configuration: host, port (MySQL default is 3306), username, password, and database name. A minimal raw MySQLoo connection looks like this:
require("mysqloo")
local db = mysqloo.connect("127.0.0.1", "gmod_user", "secret", "gmod_db", 3306)
function db:onConnected()
print("MySQLoo connected to the database.")
end
function db:onConnectionFailed(err)
print("MySQLoo connection failed: " .. err)
end
db:connect()
For DarkRP specifically, you do not normally write this yourself — you fill in the MySQL block in DarkRP’s config and DarkRP calls MySQLoo for you. The key point is that MySQLoo must already be installed and loading before the addon’s database config will work. Get the binary loading first, then configure the addon. Our Garry’s Mod documentation covers addon-specific setup in more detail.
Common Install Mistakes
| Symptom | Likely cause | Fix |
|---|---|---|
| “module not found” on require | Wrong folder or no bin folder | File must be in garrysmod/lua/bin/; create bin if missing |
| Loads on dev box, fails on server | Wrong branch (32 vs 64-bit) | Standard srcds = linux.dll/win32.dll; 64-bit branch = linux64.dll/win64.dll |
| Windows server can’t load it | Missing VC++ Redistributable | Install matching x86/x64 VC++ 2015–2019 redist |
| Renamed Linux file to .so | Wrong extension | Keep the .dll extension on Linux files |
Almost every MySQLoo problem comes down to one of these four. If you methodically check OS, branch, folder, and (on Windows) the redist, the module loads cleanly. Running on quality hardware with an easy file manager makes this trivial — that is one reason admins choose dedicated Garry’s Mod hosting built for addon-heavy setups rather than fighting a self-managed box.
Where MySQLoo Fits in Your Wider Server Setup
MySQLoo is one piece of a properly configured server. Once your database layer is working, the next things most admins set up are administration and security. A few related guides worth bookmarking:
- Lock down who can do what with proper player banning and admin commands (vanilla
banidplus ULX/SAM). - Set a strong RCON password in
server.cfgso you can manage the server remotely without exposing it. - Control whether players can fly around your map by disabling noclip with
sbox_noclip 0.
With MySQLoo loaded and these basics covered, your DarkRP economy, admin records, and player data will all persist reliably across restarts and map changes — which is exactly the point of running a database-backed server in the first place.
Frequently Asked Questions
Where do I put the MySQLoo file?
Place the single gmsv_mysqloo_* binary in garrysmod/lua/bin/. If the bin folder does not already exist inside garrysmod/lua/, create it (lowercase, exact spelling) and drop the file in there.
Which MySQLoo binary should I download?
Match both your OS and server branch. Standard 32-bit srcds uses gmsv_mysqloo_win32.dll (Windows) or gmsv_mysqloo_linux.dll (Linux). The 64-bit x86-64 branch uses gmsv_mysqloo_win64.dll or gmsv_mysqloo_linux64.dll. Most servers run the standard 32-bit branch.
Why won’t MySQLoo load on my Windows server?
The most common cause is a missing Visual C++ Redistributable. Install the matching version — x86 for a 32-bit server, x64 for a 64-bit server, commonly the VC++ 2015–2019 redist — then restart the server. Without it, the module fails to load even when placed correctly.
Why does the Linux file end in .dll?
By convention, Garry’s Mod Linux binary modules use the .dll extension even though they are Linux shared objects. Do not rename gmsv_mysqloo_linux.dll or gmsv_mysqloo_linux64.dll to .so — keep the .dll name exactly as downloaded or the module will not be found.
Do I need MySQLoo for DarkRP?
You need it if you want DarkRP to store data in a MySQL/MariaDB database rather than the default flat-file storage. DarkRP, many admin mods, and other persistence addons list MySQLoo as a dependency. Install and verify MySQLoo first, then enter your database credentials in the addon’s config.
How do I confirm MySQLoo installed correctly?
Restart the server fully, then run require("mysqloo") in server-side Lua and print the mysqloo table. If it prints a table (and mysqloo.VERSION returns a value) the module is loaded. If you get a “module not found” error, recheck the file’s location, the platform/branch match, and the Windows VC++ redist.
Ready to play?
Run your own Garry's Mod server with XGamingServer
Spin up an always-on Garry's Mod server your friends can join in minutes — no port-forwarding, no tech headaches.







