Skip to main content
You don’t need a MySQL module on a FREAKHOSTING MTA:SA server: MTA’s built-in dbConnect function supports MySQL. Create a database on the Game Panel Databases page, then connect from your resource with dbConnect("mysql", "dbname=<name>;host=<host>;port=<port>", "<user>", "<password>"). The old MySQL modules are marked outdated or deprecated on the MTA wiki.

How to connect a resource to MySQL

1

Create a database

Open Databases in the Game Panel and click Create database. Its card shows HOST (address and port 3306), DATABASE, USER NAME and PASSWORD, each with a copy button. See managing databases.
2

Enter the details

Many gamemodes, such as roleplay frameworks, have a settings file for the database. Enter the details there, as the author describes.
3

Or connect in your own script

In a server-side script, use dbConnect. The host string is a list of key=value pairs separated by semicolons:
Use the values from the Databases page, not the example values.
4

Restart the resource

Type restart <resource-name> in the Console and watch for connection errors.

What does Protect database credentials do?

Protect database credentials in Game settings > Security and anti-cheat applies extra security measures to resources that connect to MySQL with dbConnect. It is on by default; leave it on.

Do I need MySQL at all?

Not always. dbConnect("sqlite", "file.db") stores data in a local SQLite file, with no database to set up. MTA’s own accounts are kept in the internal SQLite databases internal.db and registry.db. Use MySQL when a gamemode asks for it or when you want to reach the data from a website.

How to install a server module

Modules are compiled plugins (.so files on Linux) that add functions to the server. Your server is 64-bit Linux, so a module needs a 64-bit Linux build.
1

Stop the server

2

Upload the module

Upload the .so file with the File Manager to the modules folder named in the module’s instructions.
3

Add a module line

Open mtaserver.conf (Game settings > mtaserver.conf: open the raw file) and add one line per module:
4

Start the server

Start the server and check the console for errors about the module.
Windows modules (.dll) don’t work on our Linux servers. If a module only exists for Windows, look for a script-based alternative.

Frequently asked questions

My old gamemode needs mta_mysql. What do I do?

Old gamemodes that used a MySQL module can usually be switched to dbConnect and dbQuery. Ask the author for an updated version.

Why does dbConnect fail?

Check the database name, host, port, username and password from the Databases page. The console shows the error when the resource starts.

MTA server guide

Every MTA page in one place.

Install resources

Upload, refresh, start.

Game modes

Roleplay and other gamemodes.

Databases

Create a MySQL database.

Tested by the FREAKHOSTING team on our Game Panel on 2 November 2026 (MTA:SA server 1.6, 64-bit). Steps may differ slightly if the game changes. dbConnect checked against the official Multi Theft Auto wiki.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026