Skip to content

MySQL Setup

github-actions[bot] edited this page Jan 3, 2026 · 4 revisions

Tutorial: MySQL Setup & Sync

This guide will help you connect BeaconPlus to a MySQL database, which is required if you want beacon data to be synced across multiple servers (e.g., a BungeeCord/Velocity network).

Prerequisites

  • A MySQL or MariaDB server.
  • A database created for BeaconPlus (e.g., beaconplus_db).
  • A user with full permissions for that database.

Step 1: Configure storage.yml

Open plugins/BeaconPlus/storage.yml on all your servers.

Storage:
  Beacon Storage Type: MYSQL
  MySQL:
    Host: your.mysql.host
    Port: 3306
    Database Name: beaconplus_db
    Username: your_user
    Password: your_password
    Players Table: "beacon_players"
    Beacons Table: "beacons_data"
    Use SSL: false
    Auto Reconnect: true

Step 2: Synchronization

When using MySQL, changes made on one server (like upgrading an effect) will be saved to the database. However, other servers need to know when to refresh their local cache.

BeaconPlus handles this automatically via database polling.

Note

For instantaneous sync, ensure all servers are connected to same database and the players_table and beacons_table names match exactly.

Step 3: Migration (Optional)

If you are moving from SQLITE or FILE to MYSQL, you will currently need to use an external database migration tool or manually re-import your data.

Why use MySQL?

  1. Consistency: Players' beacon levels and access lists remain the same regardless of which sub-server they are on.
  2. Performance: Offloads data management to a dedicated database engine, reducing load on the main Minecraft thread.
  3. Backups: Standard MySQL backup tools (like mysqldump) can be used to secure your plugin data.

Troubleshooting

  • Connection Refused: Check your host, port, and ensure your MySQL server allows remote connections (if not on localhost).
  • Access Denied: Double-check your username and password.
  • Table Creation Error: Ensure the database user has CREATE permissions.

Server Owner Reference

Installation
Commands & Permissions
Config.yml
Beacon.yml
GUI Reference
All Beacon Effects
All Conditions & Filters
Effect File Structure
Storage Reference

Tutorials

VIP-Only Effects
Custom Recipes
Multi-Tier Economy
MySQL Setup

Player Guide

Getting Started
Managing Beacons
Upgrading Effects
Access Control

Developer Documentation

API Basics
Custom Effects
Team Providers

Clone this wiki locally