Database
SQLite or MySQL in Database.yml, what is stored, and how often it is written.
uxmPVPCore stores statistics, battle logs and beginner protection in a database. File:
plugins/uxmPVPCore/Database.yml. Changes need a restart.
SQLite or MySQL
database.type | Use it when |
|---|---|
SQLITE (default) | One server. Nothing to set up: the data goes into plugins/uxmPVPCore/database.db |
MYSQL | A network, or you want to read the data from a website or another tool. MariaDB servers work too |
database:
type: MYSQL
mysql:
host: localhost
port: 3306
database: uxmpvpcore
username: pvpcore
password: "change-me"
prefix: apc_
| Key | Default | Meaning |
|---|---|---|
database.type | SQLITE | SQLITE or MYSQL |
database.mysql.host, port | Where the database server is | |
database.mysql.database | uxmpvpcore | The database name. Create it first |
database.mysql.username, password | The account the plugin logs in with | |
database.mysql.prefix | apc_ | Put before every table name, so the tables do not clash with other plugins. Only for MySQL |
The file also has connection pool and SQLite tuning settings, with the pool named uxmPVPCore-Pool.
Leave them as they are unless you know you need to change them.
The tables are created on the first start. Moving from SQLite to MySQL does not copy the data.
What is stored
| Data | Written |
|---|---|
| Player statistics and rating | Every flushMinutes (10) in StatisticSettings.yml, when a player leaves, and on shutdown |
| Battle logs and their details | Every flushMinutes (10) in BattleLogs.yml, and on shutdown |
| Beginner protection | At once |
| BlockRegen nodes | In their own SQLite file, blockregen.db, whatever database.type says |
Battle logs are deleted after the days set in retentionSettings, see
Battle Logs.
Several servers
With MySQL, several servers can share one database, so a player's statistics follow them across the
network. Each server keeps the players it has in memory and writes them every few minutes, so when a
player switches server, give the old server a moment to write first: keep saveOnQuit: true in
StatisticSettings.yml.
Related: Configuration, Statistics and Rating
Was this page helpful?