Connect a database to a plugin

When a plugin wants MySQL, how to get a database on PenguHost, and where to put the credentials.

1 min readDiese Anleitung auf Deutsch lesen

On this page 3
  1. Getting one
  2. Enter the credentials
  3. Access from outside

Most plugins store their data in files or SQLite and never need a database. You need MySQL/MariaDB when:

  • several servers in a network should share data (LuckPerms groups, economy balances, bans),
  • a plugin explicitly requires it (Plan analytics, some ban managers),
  • your CoreProtect or AuthMe database has grown past a few GB.

Getting one

Databases are not switched on by default. Open a ticket with the server name and how many databases you need.

Enter the credentials

Host, port, database name, username and password go into the plugin's config (plugins/LuckPerms/config.yml, for example):

YAML
storage-method: mysql
data:
  address: <host>:<port>
  database: <name>
  username: <user>
  password: <password>

Restart the server. LuckPerms and most others migrate their data with a command (/lp migration sqlite mysql).

Access from outside

The database host is reachable from your servers. For tools on your PC (HeidiSQL, DBeaver) ask in the ticket; we can allow your IP.

Still stuck?

Kowalski, the assistant in your dashboard, reads your server's log and fixes most things on request. For everything else there is the ticket system.