---
title: "Sharing Player Data Across a Network With MySQL | ZCS"
description: "On a single server, SQLite is fine. The moment a second server joins the network, shared data needs a database both servers can actually reach."
url: "https://www.zcraftstudios.com/blog/mysql-cross-server-player-data"
updated: "2026-10-20T07:15:13.005688+00:00"
source: "ZCraft Studios"
---

> Site index for AI agents: https://www.zcraftstudios.com/llms.txt (full reference: https://www.zcraftstudios.com/llms-full.txt). Every page is available as Markdown by adding `.md` to its URL or sending `Accept: text/markdown`.

1. [Home](https://www.zcraftstudios.com/)
2. [Blog](https://www.zcraftstudios.com/blog)
3. Sharing Player Data Across a Network With MySQL

[ All posts](https://www.zcraftstudios.com/blog)

# Sharing Player Data Across a Network With MySQL

ZCraft StudiosOct 3, 2026Updated Oct 20, 2026

On a single server, SQLite is fine. The moment a second server joins the network, shared data needs a database both servers can actually reach.

## In this guide

- [When This Actually Matters](#when-this-actually-matters)
- [Setting Up MySQL](#setting-up-mysql)
- [Pointing Plugins at MySQL Instead of SQLite](#pointing-plugins-at-mysql-instead-of-sqlite)
- [Do This on Every Backend Server](#do-this-on-every-backend-server)
- [Securing the Database](#securing-the-database)
- [Testing It Worked](#testing-it-worked)
- [Decide what data may safely be shared](#decide-what-data-may-safely-be-shared)
- [Official documentation and links](#official-documentation-and-links)
- [An operational test worth running](#an-operational-test-worth-running)

## Sharing Player Data Across a Network With MySQL

_A player's balance shouldn't reset just because they switched from the survival server to the minigame server._

Most plugins default to SQLite, a local file-based database that works fine for a single server. The problem shows up the moment a network has more than one backend server behind a proxy: SQLite files aren't shared between machines (or even between separate processes on the same machine), so each server ends up with its own disconnected copy of player data.

## When This Actually Matters

If every backend server behind the proxy is meant to share one economy, one set of permissions, or one set of player stats, each plugin managing that data needs to point at the same MySQL database, not its own local SQLite file.

## Setting Up MySQL

Install MySQL (or MariaDB) on a server reachable by every backend. This can be one of the backend servers itself, or a separate dedicated database host for a larger network.

```
sudo apt install mysql-server
sudo mysql_secure_installation
```

Create a database and a user for the network to use:

```
CREATE DATABASE minecraft_network;
CREATE USER 'mcnetwork'@'%' IDENTIFIED BY 'a-real-password-here';
GRANT ALL PRIVILEGES ON minecraft_network.* TO 'mcnetwork'@'%';
FLUSH PRIVILEGES;
```

## Pointing Plugins at MySQL Instead of SQLite

Most plugins that support both (LuckPerms, several economy plugins) have a `storage-method` setting in their config:

```
storage-method: MySQL

data:
  address: 'db-host:3306'
  database: 'minecraft_network'
  username: 'mcnetwork'
  password: 'a-real-password-here'
```

The exact config keys vary by plugin. This is the general shape, not a copy-paste for every plugin.

## Do This on Every Backend Server

The same MySQL connection details need to go into the matching config on **every** backend server in the network. Pointing only one server at MySQL while the rest stay on SQLite defeats the entire purpose.

## Securing the Database

A MySQL instance reachable from multiple backend servers also needs to not be reachable from the open internet:

- Bind MySQL to a private network interface, or firewall port `3306` to only the backend servers' IPs
- Use a real, unique password, not the database name or something equally guessable
- Avoid granting the network user privileges beyond what it actually needs (`ALL PRIVILEGES` on one specific database is more contained than a global grant)

## Testing It Worked

Join one backend server, change something tracked by the shared database (a balance, a permission), then switch to a different backend server through the proxy and confirm the change carried over. If it didn't, double-check every server is actually pointed at the same database and credentials. A typo in one server's config is the most common cause of "it's still not syncing."

## Decide what data may safely be shared

A shared database does not automatically make every Minecraft plugin compatible across servers. Some plugins are designed to synchronize ranks or economy balances, while inventories and live player state may need dedicated synchronization software. Two servers independently writing the same records can cause conflicts if the system lacks concurrency controls.

Before connecting a production network, make a list of the data you intend to share, identify which plugin owns each record and verify that the plugin officially supports multi-server operation.

### Recovery test

Take a consistent backup of the relevant database and plugin files. On a staging network, connect a player to two backends in sequence and verify intended values remain synchronized. Test a restart and an interrupted connection. Do not place database passwords in public documentation or expose the database directly to players.

## Official documentation and links

- [MySQL backup and recovery documentation](https://dev.mysql.com/doc/refman/8.4/en/backup-and-recovery.html)
- [A Minecraft Server Backup Strategy](https://www.zcraftstudios.com/blog/minecraft-server-backup-strategy)

## An operational test worth running

Never point unrelated plugins at the same tables unless explicitly documented. Establish per-service database users and backup procedures, then test one controlled player-state update while switching servers. Investigate plugin-specific caching and synchronization behavior before assuming that shared MySQL access creates seamless cross-server inventories.

## Continue reading

- [Velocity Proxy Setup: Connect Multiple Minecraft Servers](https://www.zcraftstudios.com/blog/velocity-proxy-network-setup)
- [Minecraft Server Backup Strategy: What to Back Up](https://www.zcraftstudios.com/blog/minecraft-server-backup-strategy)
- [Minecraft SMP Season Reset Checklist and Player Trust](https://www.zcraftstudios.com/blog/minecraft-server-season-reset-guide)
- [Find Minecraft Plugin Conflicts Without Losing Data](https://www.zcraftstudios.com/blog/minecraft-server-plugin-conflict-debugging)

[ Previous guide Aikar's Flags Explained: Do You Need Them, and How to Check](https://www.zcraftstudios.com/blog/aikars-flags-performance-tuning)[ Next guide Setting Up Geyser and Floodgate for Bedrock Cross-Play](https://www.zcraftstudios.com/blog/geyser-floodgate-bedrock-crossplay-setup)
