Skip to content
Current coupon:10% offUse it in your order

MySQL database for plugins: LuckPerms, CoreProtect and more

How to create a database for your Minecraft server in the Database tab and connect LuckPerms, CoreProtect and other plugins to it. Includes access from your computer, backups and fixing connection errors.

  • advanced
  • ~15 min
  • Updated 1 Oct 2026

Most plugins store their data in files in their own folder. For large amounts of data (block history in CoreProtect) or for sharing data between several servers (LuckPerms permissions on a network behind a proxy), a MySQL database works better. This guide shows how to create one at StormHost, how to connect LuckPerms and CoreProtect to it and how to access it from your computer.

What you'll need

  • A Minecraft server at StormHost with a plugin that supports MySQL
  • The Databases and Files permissions if you don't own the server
  • About 15 minutes

When to use MySQL instead of files#

SituationFiles (default)MySQL
One server, a normal number of playersGood enoughNot needed
A network of servers behind a Velocity proxy with shared permissionsNot possibleRequired – all servers must read the same data
CoreProtect on a big, long-running serverWorks, but the file keeps growingBetter handling of large data
You want to browse or edit the data from your computerComplicatedEasy (HeidiSQL, DBeaver)
A website that reads statistics from the serverNot possibleYes

Creating a database#

  1. In the customer area, open My services, click your Minecraft server and go to the Database tab.

  2. Type a short name in the Database name field, for example luckperms. Letters without accents, digits and underscores are allowed, up to 48 characters.

  3. Leave the Allowed connections from field at % (see below).

  4. Click Create database.

    The new database appears in the list with the Host, User, Allowed connections from and Password details.

DetailWhat it isWhere you enter it
Database name (at the top of the database)The actual database name. The system may add a prefix to the name you chose.In the plugin's “database” field. Always copy exactly what you see.
HostThe database server address in the form address:port.In the “host”/“address” field, and the port in the “port” field.
UserThe database login name (generated).In the “username”/“user” field.
PasswordThe password (shown after you click it).In the “password” field.
Allowed connections fromWhere the database can be connected to from: % = anywhere, otherwise a single IP address.Nowhere, it's just for information.

Allowed connections from

If you enter a specific IP address (for example your home one), the database accepts connections only from that address. Not even your Minecraft server will be able to connect, because it connects from a different address. So leave it at % and rely on the strong generated password. The value can't be changed after the database is created – you'd have to create a new database.

Other buttons:

  • New password – generates a new password. The old one stops working, so enter the new one right away in the configuration of every plugin that uses the database, and restart the server.
  • Delete – deletes the database along with all its data.

Deleting a database

Deleting can't be undone, and the data isn't in the server backups. Export the database before deleting it (see Database backups).

The number of databases depends on your plan. Above the list you'll see Used 1 of 10. When the limit is used up, you'll see The limit has been reached. Several plugins can share one database – each uses its own tables with its own prefix (LuckPerms luckperms_, CoreProtect co_).

LuckPerms#

Already have permissions set up?

After switching to MySQL, LuckPerms starts with an empty database. If you already have groups and permissions on the server, export them first as described in Moving existing permissions to MySQL, and only then continue.

  1. Stop the server.

  2. In the Files tab, open plugins/LuckPerms/config.yml.

  3. Find storage-method and the data section and change them:

    plugins/LuckPerms/config.ymlYAML
    storage-method: mysql
    
    data:
      address: <HOST>
      database: <DATABASE_NAME>
      username: <USER>
      password: '<PASSWORD>'

    Replace <HOST>, <DATABASE_NAME>, <USER> and <PASSWORD> with the details from the Database tab, always without the angle brackets. Keep the single quotes around the password.

  4. Save the file (Ctrl+S) and start the server.

SettingWhat it doesRecommended valueWhen to change it
storage-methodWhere LuckPerms stores data: h2 (a file, the default), mysql, mariadb, yaml and others.mysqlmariadb if you know the database server is MariaDB (LuckPerms recommends it).
data.addressThe database address. The port goes after a colon (address:port).The Host valueWhen you change databases.
data.databaseThe database name. It must already exist.The name from the Database tab–
data.username, data.passwordLogin details.From the Database tabAfter clicking New password.
data.pool-settings.maximum-pool-sizeHow many database connections LuckPerms keeps open.10Lower it (for example to 5) if the database reports too many connections.
data.pool-settings.propertiesExtra connection parameters.useUnicode: true, characterEncoding: utf8Add useSSL: false if you get an SSL warning.
data.table-prefixThe table prefix.'luckperms_'A different prefix when two servers should keep separate data in one database.
server (at the top of the file)The server name for permissions that apply only on one server in a network.globalOn a network behind a proxy, a different one for each server (lobby, survival).

Special characters in the password

Always put the password in single quotes '…'. Otherwise YAML would read characters like #, : or % as syntax. If the password contains an apostrophe ', write it twice ('').

Moving existing permissions to MySQL#

If you already have permissions in the original storage, move them over:

  1. Before changing storage-method, type this in the console:

    text
    lp export zaloha-opravneni
    • lp export – saves all LuckPerms data to a file.
    • zaloha-opravneni – the file name. This creates plugins/LuckPerms/zaloha-opravneni.json.gz.
  2. Stop the server, change config.yml as described above and start the server.

  3. Type this in the console:

    text
    lp import zaloha-opravneni.json.gz

    Type the file name including the .json.gz extension. The data is loaded into the new database.

CoreProtect#

  1. Stop the server.

  2. In the Files tab, open plugins/CoreProtect/config.yml and change:

    plugins/CoreProtect/config.ymlYAML
    use-mysql: true
    table-prefix: co_
    mysql-host: <ADDRESS>
    mysql-port: <PORT>
    mysql-database: <DATABASE_NAME>
    mysql-username: <USER>
    mysql-password: '<PASSWORD>'

    Split the Host value from the Database tab: the part before the colon goes into <ADDRESS>, the number after the colon into <PORT>.

  3. Save and start the server.

SettingWhat it doesRecommended valueWhen to change it
use-mysqlStores the history in MySQL instead of a file.truefalse to go back to the file.
table-prefixThe prefix of CoreProtect's tables.co_When CoreProtect from several servers uses one database.
mysql-hostThe database address without the port.The part of Host before the colon–
mysql-portThe database port.The part of Host after the colon–
mysql-database, mysql-username, mysql-passwordThe database name and login details.From the Database tabAfter clicking New password.

Old history isn't carried over

When you switch to MySQL, CoreProtect starts a new history. The existing records stay in the file in the plugins/CoreProtect folder, but they won't be in MySQL. So switch right at the start, not after a year of running the server.

Newer CoreProtect versions (version 25 and later) have a database-type key instead of use-mysql. If you see it in the file, set database-type: mysql – it takes priority over use-mysql.

Other plugins#

Configurations differ, but the fields are almost always the same:

Field in the plugin's configurationWhat to enter
host, hostname, addressThe address from the Host value (without the port, if there's a separate port field).
portThe port from the Host value.
database, db-nameThe database name.
username, userThe user.
passwordThe password (in quotes).
useSSL, sslfalse if the plugin reports SSL problems.
jdbc-url, urlThe full address in the form jdbc:mysql://<ADDRESS>:<PORT>/<DATABASE_NAME> (for the MariaDB driver, jdbc:mariadb://…).

Always restart the server after making changes. The /reload command often breaks plugins that use a database.

Access from your computer#

You can browse and edit the database on your computer. This works if Allowed connections from is set to %.

Windows

  1. Install HeidiSQL from heidisql.com (opens in a new window).
  2. In the session manager window, click New.
  3. As the Network type, choose MariaDB/MySQL (TCP/IP).
  4. Enter the address in Hostname / IP, the port in Port (both from the Host value), and the login details in User and Password.
  5. Click Open.

macOS

  1. Install DBeaver Community from dbeaver.io (opens in a new window).
  2. Choose Database › New Database Connection and the MySQL (or MariaDB) type.
  3. Fill in Server Host, Port, Database, Username and Password.
  4. Click Test Connection and then Finish.

Linux

Use DBeaver Community from dbeaver.io (opens in a new window) (same steps as on macOS), or a client in the terminal. On Ubuntu and Debian, install it with apt install mariadb-client and connect like this:

bash
mariadb -h <ADDRESS> -P <PORT> -u <USER> -p <DATABASE_NAME>
  • mariadb – the client for both MariaDB and MySQL.
  • -h <ADDRESS> – the database server address.
  • -P <PORT> – the port (capital P).
  • -u <USER> – the user.
  • -p – the program asks for the password (it isn't typed into the command, so it doesn't end up in your history).
  • <DATABASE_NAME> – the database you want to work with.

Newer MariaDB clients (version 11.4 and later, for example on Debian 13) verify the database server's certificate by default. If the connection fails with a TLS/SSL error that mentions a certificate, add the --disable-ssl-verify-server-cert switch after mariadb (the client then doesn't check the server's certificate). If the error says the server doesn't support SSL, use the --disable-ssl switch instead.

Careful with edits

Don't change data while the server is running – plugins keep part of their data in memory and will overwrite your change. Always make an export before editing anything by hand.

Database backups#

Backups in the Backups tab only contain the server's files, not the databases. Export them separately:

  1. Connect to the database in HeidiSQL (see above).
  2. Click the database on the left and choose Tools › Export database as SQL.
  3. Tick both table creation and data, choose output to a .sql file and click Export.

To restore: in HeidiSQL, select the database and choose File › Run SQL file. LuckPerms also has its own backup with the lp export <FILE_NAME> command.

Verification#

  • LuckPerms: type lp info in the console. The Storage section must show Type: MySQL (or MariaDB).
  • CoreProtect: type co status in the console. You'll see the line Database: Using MySQL.
  • In HeidiSQL or DBeaver, you'll see new tables in the database (luckperms_…, co_…).

Troubleshooting#

The plugin couldn't reach the database at all (the second message comes from CoreProtect). Check the address and port (the Host value, exactly, including the number after the colon). In CoreProtect, the address and port have to be in separate fields. If everything is correct, the database server may be temporarily unavailable – try again in a moment, or contact support.

Access denied for user '…'@'…' (using password: YES)#

The database rejected the user name or password:

  • You changed the password with the New password button in the meantime and the plugin still has the old one.
  • The password contains special characters and isn't in quotes.
  • Allowed connections from contains a specific IP address the server doesn't connect from. Create a new database with %.

Unknown database '…'#

The database name doesn't match. Copy it exactly from the Database tab, including any prefix.

Warning: Establishing SSL connection without server's identity verification is not recommended#

This is a warning from the MySQL driver. For LuckPerms, add useSSL: false and verifyServerCertificate: false to data.pool-settings.properties; for other plugins, look for a useSSL option.

Connection is not available, request timed out after 5000ms#

LuckPerms didn't get a connection from its pool. The database is unavailable, or the connection limit has been reached. Each server with LuckPerms keeps 10 connections by default – if more than that point at the database (a server network, other plugins), lower maximum-pool-size.

No operations allowed after connection closed#

The database closed an idle connection before the plugin renewed it. In LuckPerms, maximum-lifetime (in milliseconds) must be shorter than the database's timeout. The default of 30 minutes usually works.

Summary

  • Create the database in the Database tab and leave Allowed connections from at %.
  • Copy the details exactly, and put the password in single quotes in YAML.
  • LuckPerms: storage-method: mysql and the data section; move existing data over with lp export and lp import.
  • CoreProtect: use-mysql: true, enter the address and port separately; the old history isn't carried over.
  • Databases aren't included in server backups – export them separately (HeidiSQL).

Search the guides