How to Use MySQL with Plugins on Your Minecraft Server

Learn how to create a MySQL database and connect plugins like LuckPerms and EssentialsX to it.

MySQL databases let plugins store data externally instead of in flat files. This is essential for multi-server setups (BungeeCord networks) and improves performance for data-heavy plugins.

Creating a Database

Open Databases

Access the XGamingServer panel and go to Databases in the sidebar.

Create a new database

Click New Database. Note the connection details:

  • Host (address)
  • Port
  • Database name
  • Username
  • Password

Connecting Plugins

Example: LuckPerms

Edit plugins/LuckPerms/config.yml via Files:

storage-method: mysql
data:
  address: "your-db-host:3306"
  database: "your-db-name"
  username: "your-db-user"
  password: "your-db-password"

Example: EssentialsX

Edit plugins/Essentials/config.yml:

economy:
  mysql:
    enabled: true
    host: "your-db-host"
    port: 3306
    database: "your-db-name"
    username: "your-db-user"
    password: "your-db-password"

Plugins That Support MySQL

PluginWhat It Stores
LuckPermsPermissions, groups, user data
EssentialsXEconomy balances, homes
CoreProtectBlock logging data
DiscordSRVAccount links
DynmapPlayer data

💡 Tip: MySQL is most valuable for BungeeCord/Velocity networks where multiple servers need to share the same data (permissions, economy, etc.).

📝 Note: For single-server setups, flat file storage (default) is fine. MySQL adds complexity without much benefit unless you have large amounts of data.

See also: Import/Export MySQL | Setup LuckPerms

If you need help, join our Discord.

How is this guide?

40% Off — Limited TimeGet your Minecraft server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page