数据库
QuickShop-Hikari支持 H2 和 MySQL 两种类型数据库。
配置
#MySQL 数据库设置。
database:
#false =使用本地SQLite 数据库。
#true = 使用本地/远程MySQL数据库。
mysql: false
# 数据库地址 (仅在MySQL为true时需要)
host: localhost
# 数据库端口 (仅在MySQL为true时需要)
port: 3306
# 数据库名称 (仅在MySQL为true时需要)
database: quickshop
#数据库用户名 (仅在MySQL为true时需要)
user: root
#数据库密码 (仅在MySQL为true时需要)
password: passwd
# 设置前缀为“none”以删除前缀(适用于本地和远程)
prefix: "qs_"
# QuickShop 是否应该使用 SSL 连接数据库? (仅在MySQL为true时需要)
usessl: false
#创建连接信息,您可以在此为数据源添加自己的配置信息。 (本地和远程均可使用此配置)。
properties:
connection-timeout: 60000
validation-timeout: 3000
idle-timeout: 60000
login-timeout: 10
maxLifeTime: 60000
maximum-pool-size: 8
minimum-idle: 2
cachePrepStmts: true
prepStmtCacheSize: 250
prepStmtCacheSqlLimit: 2048
useUnicode: true
characterEncoding: utf8
Migrate
If you want to migrate your quickshop data from one type of database to another type, you can export your data then import them.
Execute the /quickshop export command in console, quickshop will export a zip which include shop datas.
Stop your database, switch the datasource, and start the server.
You may noticed all shops are gone, because new datasources had no data inside, we will restore them from export.
Rename that exported ZIP file to recovery.zip, execute /quickshop recovery and restart your server, all shops should back.