How to add a database to your Minecraft server

Print
  • 0

Many Minecraft plugins can use MySQL for shared or persistent data. LuckPerms, Plan, CoreProtect, Dynmap, voting plugins, economy plugins, and network-wide setups are common examples.

Create a plugin database

  1. Open your Minecraft server in the Ptero control panel, then open Databases.
  2. Click Create Database.

    Databases page for a Minecraft server on Ptero

  3. Use a name that tells you which plugin it belongs to, such as luckperms, coreprotect, or plan.
  4. For most Minecraft plugins, leave Connections From empty. The panel will show this as %. If you need to restrict database access, use the IP addresses, hostnames, or wildcard patterns that should be allowed.
  5. Click Create Database.

    Create database form for a Minecraft server

Use it in your plugin config

Click the eye icon next to the database to view the endpoint, username, and password.

Minecraft plugins often ask for these values as separate config options. The endpoint is written as host:port, so anglo.logicserver.co.uk:3306 would be split into host anglo.logicserver.co.uk and port 3306.

If you rotate the database password from this screen, update the plugin config before starting the server again. A plugin using the old password will usually show database connection errors in Console.

Minecraft database connection details on Ptero

After editing the plugin config, restart your Minecraft server and check Console for any database connection errors.


Was this answer helpful?

Related Articles

« Back

Follow us on Social Media

Stay in the loop! Follow our social media accounts and stay up-to-date with the latest news, announcements, tips & tricks and behind-the-scenes insights!