Назад в магазин
Minecraft MySQL JDBC
Modrinth Plugin

Minecraft MySQL JDBC

Up-to-date MySQL Connector/J wrapped as a universal Forge/Fabric/Bukkit library for plugins like Grim.

Информация о Minecraft-продукте

Важное о товаре

Совместимость, версии Minecraft, загрузчики и данные внешнего источника.

Тип

Plugin

Доступ

Бесплатно

Последняя версия

9.7.0+2026-05-03

Загрузки

1 337

Загрузчики / Платформы

bukkit fabric folia forge neoforge paper purpur quilt spigot

Minecraft версии

1.12.2 – 1.21.11 26.1 26.1.1 26.1.2

Категории

library

Описание

Подробная информация

# MySQL Connector/J for Minecraft Oracle's official [MySQL Connector/J](https://github.com/mysql/mysql-connector-j) repackaged as a Bukkit/Spigot/Paper plugin and a Fabric/Forge/NeoForge mod. > **Heads up:** CraftBukkit/Spigot/Paper have shipped MySQL Connector/J on the server's parent classloader since 1.4 (the "ebeans" era). For the **default JDBC path** (`Class.forName("com.mysql.cj.jdbc.Driver")` / `DriverManager.getConnection`) the bundled driver wins — installing this mod doesn't change that. This mod is primarily useful on **Fabric**, **NeoForge**, and Bukkit forks that strip the bundled driver. If you specifically want this mod's connector instead of the bundled one (e.g. for a newer connector version), use the public API — see [Using this mod's connector via the public API](#using-this-mods-connector-via-the-public-api) below. ## What's in the jar `com.mysql:mysql-connector-j:9.1.0` plus minimal loader stubs for Spigot, Forge 1.12, Forge 1.13–1.16, Forge 1.17–1.20, NeoForge 1.21+, and Fabric. No relocation — `com.mysql.cj.*` classes stay at canonical paths so `Class.forName("com.mysql.cj.jdbc.Driver")` finds them. `META-INF/services/java.sql.Driver` is preserved so the driver auto-registers with `DriverManager`. The `mysql:mysql-connector-java` → `com.mysql:mysql-connector-j` rename happened in connector-j 8.x. The class name `com.mysql.cj.jdbc.Driver` works across both old and new artifact coords, so the runtime probe is stable. ## Compatibility | Loader | MC versions | Notes | |---|---|---| | Bukkit / Spigot / Paper / Folia / Purpur | 1.8 → current | usually unnecessary — driver is server-bundled | | Fabric | 1.16.1 → current | needs Fabric Loader 0.14+ | | Forge | 1.12 → 1.20 | universal jar, no Mixins | | NeoForge | 1.21 → current | drop into `mods/` | Java 8+ required. ## Connection-string gotchas worth knowing The 5.1.x and 8+ drivers default to behaviours that almost always need overriding for real deployments: - `useSSL=true` is the default — fails against any MySQL server without a public CA-signed cert. Set `useSSL=false` for plaintext, or add `verifyServerCertificate=false` if you have a self-signed cert. - `caching_sha2_password` (MySQL 8 default) needs `allowPublicKeyRetrieval=true` for unencrypted-channel auth, otherwise the handshake fails with `Public Key Retrieval is not allowed`. - `rewriteBatchedStatements=true` folds JDBC batch INSERTs into multi-row form on the wire. Without it, batch operations are still N round-trips. Typical URL: ``` jdbc:mysql://host:3306/db?useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true ``` MariaDB speaks the MySQL protocol on the wire, so this driver works against MariaDB too. If you want the MariaDB-native connector instead, it's a separate driver and not in scope here. ## Versioning The jar version tracks connector-j one-to-one. `9.1.0+2026-04-25` ships connector-j 9.1.0; the suffix is the build date. A scheduled GitHub Action checks Maven Central daily and bumps automatically. ## Using this mod's connector via the public API If you specifically want this mod's connector instead of the bundled one — to upgrade past a stale fork's bundled driver, or to test a newer connector version — your plugin softdepends on this holder and calls `MinecraftMysqlJdbc.connect(url, props)`: ```yaml # in your plugin.yml softdepend: [mysql-jdbc] ``` ```java Properties props = new Properties(); props.setProperty("user", "grim"); props.setProperty("password", "..."); Connection c; try { c = MinecraftMysqlJdbc.connect("jdbc:mysql://host:3306/db?useSSL=false", props); } catch (NoClassDefFoundError | ClassNotFoundException notInstalled) { c = DriverManager.getConnection("jdbc:mysql://host:3306/db?useSSL=false", props); } ``` `MinecraftMysqlJdbc` wraps a child-first `URLClassLoader` pointing at this jar, parented to the platform classloader so `com.mysql.cj.*` must come from this jar (not the bundled chain). The returned `Connection` is a standard `java.sql.Connection` — keep your casts to `java.sql.*` interfaces; the impl class lives in the child-first classloader and won't down-cast across the boundary. API surface (all static): | Method | Returns | |---|---| | `connect(String url)` | open `Connection` through this driver | | `connect(String url, Properties props)` | as above with props | | `driver()` | the `java.sql.Driver` instance | | `driverVersion()` | connector-j version (e.g. `"9.1"`) | | `eagerInit()` | warm the classloader at plugin enable | | `shutdown()` | release file handles on plugin disable | Grim Anti-Cheat's MySQL backend uses this API automatically when this holder is installed. ## License GPL-2.0 with the [Universal FOSS Exception 1.0](https://oss.oracle.com/licenses/universal-foss-exception/). The exception makes the driver compatible with any FOSS-licensed Minecraft plugin or mod (it's the same license Oracle ships with the Connector/J binary). Modrinth's license tag shows GPL-2.0-only because the SPDX list doesn't have a single identifier for the GPL-2 + FOSS Exception combo — full text in [`LICENSE`](https://github.com/Axionize/minecraft-mysql-jdbc/blob/main/LICENSE). --- Issues, source: [GitHub](https://github.com/Axionize/minecraft-mysql-jdbc).

Разработчик

Axionize

Профиль и данные получены с Modrinth

Открыть на Modrinth

Галерея продукта

Изображения проекта

Скриншоты и изображения из оригинальной страницы Modrinth.

Изображений пока нет

Автор проекта не добавил галерею на Modrinth.

Список изменений

Версии проекта

Опубликованные версии и оригинальные файлы Modrinth.

9.7.0+2026-05-03 Актуальная Release 06.06.2026

9.7.0+2026-05-03

Поддерживаемые версии Minecraft
1.12.2 1.13 1.13.1 1.13.2 1.14 1.14.1 1.14.2 1.14.3 1.14.4 1.15 1.15.1 1.15.2 1.16 1.16.1 1.16.2 1.16.3 1.16.4 1.16.5 1.17 1.17.1 1.18 1.18.1 1.18.2 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11 26.1 26.1.1 26.1.2
Загрузчики / Платформы
bukkit fabric folia forge neoforge paper purpur quilt spigot
Показать изменения
ci: fix unterminated quote in version echo
Войти

2.52 MB

9.7.0+2026-05-03 Release 03.05.2026

9.7.0+2026-05-03

Поддерживаемые версии Minecraft
1.12.2 1.13 1.13.1 1.13.2 1.14 1.14.1 1.14.2 1.14.3 1.14.4 1.15 1.15.1 1.15.2 1.16 1.16.1 1.16.2 1.16.3 1.16.4 1.16.5 1.17 1.17.1 1.18 1.18.1 1.18.2 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11 26.1 26.1.1 26.1.2
Загрузчики / Платформы
bukkit fabric folia forge neoforge paper purpur quilt spigot
Показать изменения
Merge pull request #1 from Axionize/bump/mysql-connector-j-9.7.0 chore: bump mysql-connector-j to 9.7.0
Войти

2.52 MB

9.1.0+2026-04-25 Release 26.04.2026

9.1.0+2026-04-25

Поддерживаемые версии Minecraft
1.12.2 1.13 1.13.1 1.13.2 1.14 1.14.1 1.14.2 1.14.3 1.14.4 1.15 1.15.1 1.15.2 1.16 1.16.1 1.16.2 1.16.3 1.16.4 1.16.5 1.17 1.17.1 1.18 1.18.1 1.18.2 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11 26.1 26.1.1 26.1.2
Загрузчики / Платформы
bukkit fabric folia forge neoforge paper purpur quilt spigot
Показать изменения
modrinth body: document the public API + holder-driven engine upgrade Recasts the 'this mod is inert on Bukkit' framing into the two-path distinction: - Default path (DriverManager.getConnection): bundled driver wins, this mod is no-op. - Workaround path (MinecraftSqliteJdbc.connect / MinecraftMysqlJdbc.connect): child-first classloader gives consumers explicit access to this mod's driver, useful for newer engine features the server's bundled driver doesn't have. Adds API table + softdepend + code snippet so consumer plugin authors can wire it up. Cross-references Grim's wiki for the auto-detection integration.
Войти

2.51 MB