Database
Available Database Types
SQLite-v2: Doesn't require any database server and works without setting anything up.
MySQL: Use MySQL-v2 instead. This database mode is deprecated.
MySQL-v2: We recommend using MySQL, if you need to connect your database to an external system, or you use a backup system that requires it. If you want to use MySQL: Make sure that your MySQL server is set up correctly (up-to-date MySQL server version, connection limits, utf8mb4_0900_as_cs as table encoding, etc.). This also supports synchronizing claim data across multiple servers in combination with Redis. Please make sure to configure the table-prefix correctly:
We recommend using MySQL-v2 over SQLite, if possible.
Backups
If you want to take backups of your database, you may want to use MySQL-v2 and set up a backup service or just a simple script of your choice. This is specific to your environment.
Migrate your Database to MySQL-v2, SQLite-v2
If you use MySQL, make sure that there are no tables with the same table-prefix!
Also, if you want to convert to MySQL, make sure the credentials and database name is set up correctly in your Lands config.
Make sure to take a backup of your current database. After you have followed these steps, execute this command:
/lands admin migratedb [sqlite, mysql]
Synchronizing Claims across Servers
A MySQL database and Redis instance is required. It won't work properly without Redis! If you want to synchronize claim data between servers, make sure to configure the following sections in config.yml.
MySQL:
If you're currently using the old SQL schema, please make sure to migrate to the new one using /lands admin migratedb mysql-v2
. Before migration, make sure to use a different table-prefix
for mysql-v2
, if you're currently using mysql
. In case it's the same, adjust it and then reload the configuration before migration.
Redis:
It is very important to properly configure the server-name
and master
option properly.
Schema Migration
You might have gotten a warning in console that you should migrate to the new SQL schema.
SQLite
To migrate to the new SQL schema with SQLite, follow these instructions:
Make sure that sqlite-v2 is disabled in config.yml and you currently still use the old database.
Execute
/lands admin migratedb sqlite-v2
Enable
sqlite-v2
in config.yml:
Restart the server.
MySQL
To migrate to the new SQL schema with MySQL, follow these instructions:
Configure the mysql-v2 section in config.yml. Make sure that mysql-v2 is disabled, and you currently still use the old database. Also, make sure to use a different table prefix or database than your current MySQL config!
Execute
/lands admin migratedb mysql-v2
and check for any error messages, in case you provided the wrong credentials etc.Enable mysql-v2 in config.yml.
Restart the server.
Last updated