MySQL Background

MySQL Databases

Learn how to create and connect a MySQL database for your plugins to store data reliably and efficiently.

1 Why use MySQL?

By default, many plugins use "Flat-file" storage (like .yml or .db files). While these are easy to set up, they can slow down your server as your player base grows. MySQL is a dedicated database system that allows plugins to save and load data much faster, especially for data-heavy plugins like:

  • LuckPerms
  • CoreProtect
  • LiteAnnouncer
  • Various Economy Plugins

2 Creating your Database

Deduck provides free MySQL databases with every server. To create one:

  1. Log in to your Deduck Dashboard.
  2. Navigate to the Databases tab on the left sidebar.
  3. Click the New Database button.
  4. Give your database a name (e.g., luckperms_db) and click Create.

3 Connecting a Plugin

Once created, click the eye icon or "View Credentials" to see your connection details. You will need these for your plugin's config.yml:

Host mysql.deduck.de
Port 3306
Username u123_abc
Database s123_myplugin

Important: Never share your database password with anyone. If you think it's been compromised, you can reset it in the Databases tab.

4 Troubleshooting Connections

If your plugin fails to connect ("Communications link failure"), check the following:

  • Credentials: Ensure there are no leading/trailing spaces in your config.
  • SSL/TLS: Some modern plugins require useSSL=false in the connection string if not configured for encrypted transit.
  • Remote Access: Deduck databases are configured to allow access from our internal network. If you are trying to connect from a home PC, ensure you have enabled "External Access" and whitelisted your IP.

5 Maintenance and Backups

Even though Deduck performs daily system backups, we recommend exporting your database before major plugin updates. You can use the **phpMyAdmin** link in your dashboard to export your tables to a .sql file. This ensures you can revert changes if a plugin update corrupts its own table structure. Regularly cleaning up old logs in tables like coreprotect_data can also significantly improve query performance and reduce disk I/O overhead.