Many plugins keep their data in a MySQL database instead of files, for example permissions, balances or the history of block changes. Several servers, such as the lobby and survival server of a network, can then share the same data. You create the database yourself in the panel and then enter its credentials in your plugin's configuration.
Where to find the databases
Open your server under My Servers, click Files & worlds on the left and then Databases. In the classic tile view the section sits under Files & Data. At the top you see how many databases you have created and how many your plan allows, for example "0 / 3 databases".
If you see Not included in plan on the right instead of the button, your plan has no databases. On a free server the section is locked as a Premium feature; a paid plan unlocks it.
Create a database
- Click Create database.
- Enter a name, for example
luckperms. Lowercase letters, numbers and underscores are allowed, up to 48 characters. - Remote access is already set to All IPs (recommended for plugins). Leave it as it is.
- Click Create.
- The New password window now shows the database password. Copy it and store it somewhere safe, such as a password manager. The panel shows it only this once.
The panel puts an identifier of your server in front of your name, so luckperms becomes something like s1234_luckperms. This full name is what you see in the list, and it is the name you enter in the plugin later.
The credentials
Each database then appears as its own card in the list. It shows:
- User: the username for logging in. Clicking it copies it.
- Connection: the connection in the format
mysql://user@host:port/databasename. Read the host and port from it; clicking the line copies it as well. - The password from the window you saw after creating the database.
The Remote badge means the database is reachable over the network: from your game server and, if you like, from a program on your PC.
Connect a plugin to the database
- Stop the server.
- Open the plugin's configuration file in the file manager, usually
plugins/<PluginName>/config.yml. - Switch the storage type to MySQL or MariaDB. In LuckPerms the setting is called
storage-method. - Enter the host and port from the connection line (many plugins expect both together as
host:port), plus the full database name, the user and the password. - Turn on SSL in the same file. In many plugins the setting is called
useSSLorssl; set it totrue. - Save the file, start the server and check the console to see whether the plugin loads without database errors.
The exact field names for your plugin are in its documentation or in the comments of its configuration file.
No connection without SSL
The databases only accept encrypted connections, which is why every card shows the note "Encrypted connection required". Without the SSL setting the database rejects the login with "Access denied", even though the user and password are correct. If you see that message, check SSL first and the credentials second.
View, back up and import tables
With a database program on your PC, such as HeidiSQL, DBeaver or MySQL Workbench, you can look at your plugins' tables, back them up or import an old database. Enter the host, port, user and password there and enable SSL or TLS in the connection settings.
We offer phpMyAdmin as an add-on together with the MariaDB add-on. It manages that add-on's database. For the databases in the Databases section, use a program as described above. The guide Book Extras: IP, Backups and Bots shows how to add MariaDB and phpMyAdmin under Plan & server → Extras.
Reset the password or delete a database
Each card has two buttons on the right:
- Reset password (the circling arrows) makes the old password invalid immediately. The panel does not show the new password afterwards; support gives it to you when you tell them the database name. Until then the plugin cannot log in, so only reset the password when you need to.
- Delete (the bin) removes the database and all its data. Back up anything you want to keep first.
If a database is still empty and you have lost the password, it is quicker to delete it and create it again. The panel then shows you a new password.