Skip to content

mysql.yml

MySQL storage lets multiple server processes point at one statistics table. Arena definitions remain local in arena.yml.


  1. Create a MySQL database and a restricted database user.
  2. Add database: mysql to config.yml.
  3. Set address, user, and password in mysql.yml.
  4. Stop and start the server.
  5. Confirm that the configured table was created and no connection warning appears.

KeyPurpose
addressFull JDBC URL, including host, port, database name, and connection parameters.
userMySQL account name.
passwordPassword for that account.
stats-tableTable name used for Snake statistics. Default: the_snake_stats.
test-on-startupLets the shared database layer validate the connection during startup.
address: jdbc:mysql://127.0.0.1:3306/minecraft?useSSL=false&autoReconnect=true&createDatabaseIfNotExist=true
user: snake_plugin
password: change-this-password
stats-table: the_snake_stats
test-on-startup: true

The plugin creates the table if it does not exist. It stores:

  • uuid as the primary key;
  • the latest player name;
  • integer columns for win, lose, win_streak, best_score, total_score, and games_played.

If a newer build introduces a missing persistent statistic column, startup initialization adds it automatically with its default value.


  • Use a dedicated database user with access only to the Snake database.
  • Keep mysql.yml out of public repositories and support logs.
  • Back up the database before renaming stats-table or migrating between storage modes.
  • Do not paste real credentials into issue reports.