Minecraft MySQL JDBC Mod (26.3, 1.20.1) – Connect Your Server Plugins
Minecraft MySQL JDBC Mod provides an up-to-date MySQL Connector/J driver wrapped as a universal library for servers. This mod helps other mods and plugins, such as Grim Anti-Cheat, connect to external MySQL or MariaDB databases. It is most useful on Fabric, NeoForge, and custom Bukkit forks that remove the default bundled database driver.
![]()
Features:
- Universal Database Library: Packages Oracle’s official MySQL Connector/J (version 9.1.0) into a single jar file that works across Fabric, Forge, NeoForge, and Bukkit-based servers.
- Standard Class Paths: Keeps all
com.mysql.cj.*classes in their original locations without relocation so standard database calls find the driver right away. - Public API Bypass: Includes a dedicated
MinecraftMysqlJdbcclass with a child-first classloader so plugins can use this newer driver instead of older server-bundled ones. - Auto-registers with
DriverManagerby keeping the standard Java SQL driver service files intact. - Works with MariaDB servers since MariaDB uses the MySQL wire protocol.
- Connects automatically with Grim Anti-Cheat’s MySQL backend when installed on the server.
Public API Methods:
connect(String url): Opens a standard SQL connection through this driver.connect(String url, Properties props): Opens a connection using custom user and password properties.driver(): Returns the activejava.sql.Driverinstance.driverVersion(): Returns the current connector-j version string, such as"9.1".eagerInit(): Warms up the classloader when a plugin starts.shutdown(): Releases open file handles when a plugin turns off.
Configuration:
useSSL=false: Turns off SSL for plain text connections when your MySQL server does not have a public CA-signed certificate.verifyServerCertificate=false: Lets you connect using a self-signed SSL certificate without failing the check.allowPublicKeyRetrieval=true: Allows unencrypted authentication with MySQL 8’s defaultcaching_sha2_passwordsystem.rewriteBatchedStatements=true: Combines batch insert queries into multi-row statements to speed up database traffic.
jdbc:mysql://host:3306/db?useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
# in your plugin.yml
softdepend: [mysql-jdbc]
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);
}
How to Install:
New to Minecraft? Follow our step-by-step guide to install Mods on your PC.View Guide
Requirements:
Minecraft MySQL JDBC Mod Download Links
0

























This post has no comments yet. Be the first — your comment will appear here.