MySQL Configuration
By default, KOTL stores player data in data/stats.yml. MySQL can be used when statistics need to live in an external database.
Database Address
Section titled “Database Address”address: jdbc:mysql://localhost:3306/<database_name>?useSSL=false&autoReConnect=true&createDatabaseIfNotExist=true| Part | Description |
|---|---|
localhost | Database host or IP address. |
3306 | MySQL port. |
<database_name> | Database name that must be replaced. |
useSSL=false | Disables SSL unless your database requires it. |
autoReConnect=true | Requests automatic reconnection. |
createDatabaseIfNotExist=true | Allows creation when the account has permission. |
Credentials
Section titled “Credentials”user: rootpassword: <your_password>Replace both values with a dedicated database account. The password is stored as plain text, so never publish mysql.yml.
Statistics Table
Section titled “Statistics Table”The current storage implementation reads:
stats-table: kotl_statsThe table contains:
uuidnamekilldeathscoretours_played- Serialized
arena_scores
KOTL creates the table if needed and adds missing statistic columns during startup.
Startup Test
Section titled “Startup Test”test-on-startup: trueWhen enabled, the shared database connection layer validates credentials during startup and reports connection errors to the console.
Common Issues
Section titled “Common Issues”- Access denied: Verify username, password, database grants, and permitted host.
- Communications link failure: Verify host, port, firewall, and MySQL availability.
- Unknown database: Create it manually or grant permission for
createDatabaseIfNotExist. - Queries reference a null table: Ensure the key is named
stats-table.