NewSchokr 13 is here. A whole new UI, seven locations, snapshots and more. Read more →

Plugins that need MySQL: using SQLite, H2 or an external database

Schokr has no built-in MySQL. Learn how to switch plugins like LuckPerms and CoreProtect to SQLite or H2, or connect them to an external database.

Updated · 2 min read

Schokr does not include per-server MySQL databases. Most popular plugins do not need one: they can store data in a local file using SQLite or H2. If you truly need MySQL or MariaDB, for example to share data between several servers, use an external database provider.

SQLite and H2 keep the whole database in a file inside the plugin's folder. They need no setup, are fast enough for most servers, and are included in your server's snapshots and backups.

Many plugins already default to file storage. Check the storage, database or data section of the plugin's config.yml.

LuckPerms (plugins/LuckPerms/config.yml):

storage-method: h2

CoreProtect (plugins/CoreProtect/config.yml):

use-mysql: false

With MySQL disabled, CoreProtect uses SQLite in database.db.

Other plugins use names like type: sqlite, storage: SQLITE or database.driver: sqlite. Look for words like sqlite, h2, local, flatfile or yaml in the plugin's documentation.

Option 2: connect to an external database

If a plugin only supports MySQL, or you want several servers to share the same data (for example LuckPerms across a BungeeCord network), you can use a database hosted somewhere else. Several providers offer managed MySQL or MariaDB, some with free tiers.

A typical config looks like this:

storage-method: mysql
data:
  address: db.example.com:3306
  database: minecraft
  username: myuser
  password: "your-password"

Tips:

  • Choose a database region close to your server's location to keep latency low. Every query travels over the internet, so a far-away database causes lag.
  • Use a separate username and a strong password, and never share configs that contain them.
  • Make sure the provider allows connections from outside, since your server connects over the public internet.
  • External databases are not included in your Schokr snapshots. Use the provider's backups.

The error you see when MySQL is missing

If a plugin is set to MySQL but cannot reach a database, the console shows errors such as:

com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
java.sql.SQLNonTransientConnectionException: Could not create connection to database server
Connection refused

The plugin then usually disables itself. Switch it to SQLite or H2, or fix the external database address and credentials.

Moving existing data

Switching storage type does not copy data automatically. Some plugins include a migration command (LuckPerms has /lp export and /lp import, for example). Otherwise expect to start fresh, so decide on storage before players build up data.

Coming soon

Free S3-compatible storage, called Schokr databases, is coming soon. It is object storage, not a MySQL replacement, so file-based storage or an external provider remain the options for SQL databases.