mysql.yml
MySQL storage lets multiple server processes point at one statistics table. Arena definitions remain local in arena.yml.
Enable MySQL
Section titled “Enable MySQL”- Create a MySQL database and a restricted database user.
- Add
database: mysqltoconfig.yml. - Set
address,user, andpasswordinmysql.yml. - Stop and start the server.
- Confirm that the configured table was created and no connection warning appears.
Connection Settings
Section titled “Connection Settings”| Key | Purpose |
|---|---|
address | Full JDBC URL, including host, port, database name, and connection parameters. |
user | MySQL account name. |
password | Password for that account. |
stats-table | Table name used for Snake statistics. Default: the_snake_stats. |
test-on-startup | Lets the shared database layer validate the connection during startup. |
address: jdbc:mysql://127.0.0.1:3306/minecraft?useSSL=false&autoReconnect=true&createDatabaseIfNotExist=trueuser: snake_pluginpassword: change-this-passwordstats-table: the_snake_statstest-on-startup: trueTable Structure
Section titled “Table Structure”The plugin creates the table if it does not exist. It stores:
uuidas the primary key;- the latest player
name; - integer columns for
win,lose,win_streak,best_score,total_score, andgames_played.
If a newer build introduces a missing persistent statistic column, startup initialization adds it automatically with its default value.
Security
Section titled “Security”- Use a dedicated database user with access only to the Snake database.
- Keep
mysql.ymlout of public repositories and support logs. - Back up the database before renaming
stats-tableor migrating between storage modes. - Do not paste real credentials into issue reports.