跳转至

存储配置

PlotSquared 支持多种存储后端。

存储类型

类型 说明 适用场景
file 文件存储 小型服务器
sqlite SQLite 数据库 中型服务器
mysql MySQL 数据库 大型/多服务器
mariadb MariaDB 数据库 大型服务器

配置示例

文件存储(默认)

storage:
  type: file
  file: "plots.db"

MySQL

storage:
  type: mysql
  host: localhost
  port: 3306
  database: plotsquared
  username: root
  password: password
  pool-size: 10

SQLite

storage:
  type: sqlite
  file: "plots.db"

迁移

使用命令迁移存储后端:

/squared storage migrate