# Storage and data URL: https://greenarrowlol.github.io/TNTGamesCore/docs/configuration/storage/ Section: configuration -------------------------------------------------------------------------------- Storage and data Where the plugin keeps player stats and how to switch between SQLite and MySQL. The plugin stores player stats (kills, wins, streaks, and so on) in a database. SQLite is the default and needs no setup. MySQL is optional, for sharing stats across several servers. Runtime drivers The database drivers are not bundled inside the plugin jar. On the first server start, the plugin downloads the SQLite and MySQL drivers from Maven Central and loads them. This keeps the jar small and works on both Spigot and Paper. The drivers are cached in: plugins/TNTGamesCore/libs/ Warning Warning The first start needs internet access to fetch the drivers. On an offline server, copy the driver jars into plugins/TNTGamesCore/libs/ from a machine that has them, then start the server. SQLite (default) Nothing to configure. The plugin creates a stats.db file in its data folder: plugins/TNTGamesCore/stats.db In config.yml: database: enabled: false # false = SQLite Good for a single server. The file lives with the rest of your plugin data, so backing it up is just copying the folder. MySQL (optional) Use MySQL to share stats across a network. Set enabled: true and fill in the connection details: database: enabled: true host: localhost port: 3306 database: tntgames username: root password: changeme 1Create the databaseMake an empty database (for example tntgames) and a user that can access it. 2Fill in config.ymlSet enabled: true and enter the host, port, database, username, and password. 3Restart the serverRestart so the plugin connects. The console prints Connected to MySQL database! on success. ::: The plugin creates its stats table automatically on first connect. You do not need to run any SQL. Note Note If the plugin cannot connect, it logs the error and continues running; stats just will not save. Check the host, port, and credentials, then reload or restart. Related Configuration: the database block. Scoreboards and stats: what gets tracked. -------------------------------------------------------------------------------- Metadata: - Word Count: 315 - Reading Time: 2 minutes