Data & MySQL

Storage Types

  • Local files are stored in the MysteryBoxes/data/ folder.

  • MySQL data is stored in tables that start with the MB prefix.

How to enable MySQL

  1. Open the config.yml file.

  2. Set enabled to true under mysql-settings.

  3. Fill in the credentials to match your database's settings.

How to set-up File Sync

File Sync allows you to keep some config files in the database. This is very useful when you have the plugin on more than one server. It makes managing the files easier because you only have to deal with one copy of each file.

After you change a file in the database, you can use the command /mb release on any server. This will send the changes to all the plugins that are linked to that database.

  1. Enable the File Sync

  2. Open phpMyAdmin

  3. Open the tables that start with the "MB_FILE_" prefix.

  4. Execute a query to add a file to the table.

    • Example: INSERT INTO MB_FILE_BOXES (ID, FILE) VALUES ('testID', 'configFile');

Last updated