Database Setup (MySQL / MariaDB / XAMPP)

Complete guide for connecting your FiveM MySQL/MariaDB database (including XAMPP, txAdmin, and Linux VPS) to the Finals Web Panel.

The Finals Web Panel connects directly to your FiveM server's SQL database to manage players, inventories, offline characters, vehicles, accounts, and server economy in real-time.

This guide explains how to properly configure your database, firewall, and user permissions to ensure a smooth, error-free connection.


1. Understanding the Cloud Architecture

[!IMPORTANT] Why localhost or 127.0.0.1 will NOT work: The Finals Web Panel is hosted in the cloud (panel.projectfinals.live). When you enter localhost or 127.0.0.1, the cloud server attempts to connect to itself, not your computer or VPS.

You must provide the Public IPv4 address or domain name of the machine hosting your MySQL/MariaDB database.


2. Standard SQL Ports

ParameterDefault ValueNotes
Default Port3306Standard port for MySQL, MariaDB, and XAMPP.
ProtocolTCPInbound TCP traffic must be allowed.
Alternative Ports3307, 33060Enter your custom port in the panel if configured differently.

3. Configuring XAMPP for Remote Access

If you run your server database using XAMPP on Windows, remote connections are blocked by default. Follow these steps to allow the panel to connect:

Step 1: Allow External IPs in my.ini

  1. Open the XAMPP Control Panel.

  2. Next to MySQL, click Config -> my.ini.

  3. Press Ctrl + F and search for bind-address.

  4. If bind-address is set to 127.0.0.1, change it to:

    Config
    bind-address = 0.0.0.0

    (Or prepend a # to comment out the line).

  5. Confirm that port = 3306 is set under both the [client] and [mysqld] sections.

  6. Save the file (Ctrl + S).

  7. In the XAMPP Control Panel, click Stop on MySQL, then click Start to apply the changes.

Step 2: Open Windows Defender Firewall (Port 3306)

  1. Press Windows Key + R, type wf.msc, and press Enter (opens Windows Defender Firewall with Advanced Security).
  2. Click Inbound Rules in the left sidebar.
  3. In the right actions menu, click New Rule....
  4. Select Port -> click Next.
  5. Select TCP and enter Specific local ports: 3306 -> click Next.
  6. Select Allow the connection -> click Next.
  7. Keep all profiles checked (Domain, Private, Public) -> click Next.
  8. Name the rule MySQL Remote Access (3306) and click Finish.

[!NOTE] If your PC or VPS is behind a home router or cloud provider firewall (e.g., Oracle Cloud Security Lists, AWS Security Groups, Azure NSG), remember to forward/allow port 3306 TCP to your machine.


4. Configuring Linux (Ubuntu / Debian / MariaDB)

If your database is hosted on a Linux VPS:

  1. Edit your MariaDB/MySQL configuration file:

    Shell
    sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
    # (Or /etc/mysql/my.cnf on older systems)
  2. Find the bind-address directive and set it to:

    Config
    bind-address = 0.0.0.0
  3. Save the file and restart the database service:

    Shell
    sudo systemctl restart mariadb
    # or sudo systemctl restart mysql
  4. Open port 3306 in your firewall:

    Shell
    sudo ufw allow 3306/tcp

5. Creating a Dedicated Remote Database User

By default, the default root user is restricted to localhost (root@localhost). If you try to connect using root, MySQL will reject the connection with error code 1130 (ER_HOST_NOT_PRIVILEGED).

We strongly recommend creating a dedicated user for the Finals Web Panel.

Option A: Using phpMyAdmin

  1. Open phpMyAdmin in your browser (http://localhost/phpmyadmin).
  2. Click on the User accounts tab at the top.
  3. Click Add user account.
  4. Set the following fields:
    • User name: finalspanel
    • Host name: Select Any host (this sets the wildcard %).
    • Password: Enter a strong password.
    • Re-type: Re-enter the password.
  5. Under Global privileges, check Check all (or grant all privileges specifically on your FiveM database).
  6. Scroll to the bottom right and click Go.

Option B: Using SQL Console / CLI

Run the following SQL commands in your database terminal or phpMyAdmin SQL tab:

SQL
-- 1. Create remote user
CREATE USER 'finalspanel'@'%' IDENTIFIED BY 'YourStrongPasswordHere!';

-- 2. Grant privileges on your server database (replace 'es_extended' with your database name)
GRANT ALL PRIVILEGES ON `es_extended`.* TO 'finalspanel'@'%';

-- 3. Reload privileges
FLUSH PRIVILEGES;

[!TIP] For MySQL 8.0+, ensure the authentication plugin is set to standard native password if your server uses legacy authentication:

SQL
ALTER USER 'finalspanel'@'%' IDENTIFIED WITH mysql_native_password BY 'YourStrongPasswordHere!';
FLUSH PRIVILEGES;

6. Adding your Database in Finals Web Panel

Once your database is configured:

  1. Open the Finals Web Panel.
  2. Go to Servers -> Select your server -> Settings -> Database.
  3. Enter your connection details:
    • Database Host: Your public IP (e.g. 198.51.100.25)
    • Database Port: 3306
    • Database Name: Your database name (e.g. qbox_live or esxlegacy)
    • Database User: finalspanel
    • Database Password: Your strong password
  4. Click Test & Save Connection.

7. Troubleshooting Common Errors

Error MessageProbable CauseHow to Fix
ETIMEDOUT / Connection timed outPort 3306 is blocked by firewall or router.Open port 3306 (TCP) in Windows Firewall or Linux UFW, and ensure cloud security groups allow inbound 3306.
ER_HOST_NOT_PRIVILEGED (1130)The user host is set to localhost instead of %.Recreate user with host % using the SQL command in Section 5.
ER_ACCESS_DENIED_ERROR (1045)Incorrect database username or password.Double check the credentials entered in the panel settings.
ER_BAD_DB_ERROR (1049)The specified database name does not exist.Check exact spelling and casing of your database name in phpMyAdmin.
ECONNREFUSEDMySQL service is not running or listening on another port.Verify MySQL/MariaDB service is running and configured to listen on port 3306.
Cannot use localhost / 127.0.0.1The panel was configured with a loopback IP.Use the public IPv4 address of your server.