Repository navigation
Skript 2.14.3 - MySQL Fix
Drop-in replacement for Skript-2.14.3.jar that removes the ancient SQLibrary dependency and replaces it with direct JDBC connections.
The Problem
Skript 2.14.3 still requires the abandoned SQLibrary plugin (lib.PatPeter.SQLibrary) for MySQL variable storage. SQLibrary hasn't been updated in over 8 years and is no longer available for download - making MySQL-backed variables completely broken on modern Paper servers.
Symptoms:
java.lang.NoClassDefFoundError: lib/PatPeter/SQLibrary/Database
Could not establish MySQL connection: Attempted reconnect 3 times. Giving up.
The Fix
All SQLibrary references have been replaced with a lightweight DatabaseWrapper abstraction that connects directly via JDBC using the MySQL Connector/J driver already bundled with Paper.
| What changed | Details |
|---|---|
| Removed | All lib.PatPeter.SQLibrary imports & dependencies |
| Added | DatabaseWrapper.java - abstract JDBC base class |
| Added | MySQLDatabase.java - MySQL connection via DriverManager |
| Added | SQLiteDatabase.java - SQLite connection via DriverManager |
| Modified | SQLStorage.java - keep-alive & transaction threads fixed |
| Modified | MySQLStorage.java - uses DatabaseWrapper |
| Modified | SQLiteStorage.java - uses DatabaseWrapper |
Connection Features:
useSSL=false+allowPublicKeyRetrieval=true(MySQL 8.x compatible)- Connect timeout: 10s, Read timeout: 30s
- Auto-detection of MySQL Connector/J 8.x and 5.x drivers
- Detailed error diagnostics (SQLState, ErrorCode, Root Cause)
Installation
- Download
Skript-2.14.3-fixed.jarbelow - Replace your existing Skript-2.14.3.jar in
plugins/ - Delete SQLibrary from
plugins/- it's no longer needed - Grant MySQL permissions for TCP connections:
GRANT ALL PRIVILEGES ON skript.* TO 'your_user'@'127.0.0.1';
FLUSH PRIVILEGES;- Restart the server
Important
Your config.sk database section does not need any changes. The same format as before is used.
Compatibility
| Server | Status | Notes |
|---|---|---|
| Paper / Purpur / Folia | Works out of the box | MySQL Connector/J is bundled |
| Spigot / CraftBukkit | Requires extra step | MySQL driver must be added manually (see below) |
Spigot / CraftBukkit Setup
Spigot does not bundle the MySQL JDBC driver. Download it manually and place it in your server's classpath:
- Download mysql-connector-j-9.2.0.jar from Maven Central
- Place it in your server root directory (next to
spigot.jar) - Add it to your startup command:
java -cp spigot.jar:mysql-connector-j-9.2.0.jar org.bukkit.craftbukkit.MainOr alternatively, place it inside the plugins/ folder — some server implementations will pick it up from there.
Tested With
| Component | Version |
|---|---|
| Paper | 1.21.11 |
| Java | 17+ (tested with 23.0.2) |
| MySQL | 5.7+ / 8.x (Connector/J 8.3.0 & 9.2.0) |
| MariaDB | 10.3+ |
| Skript | 2.14.3 |
Source
All modified .java source files are available in the src/ directory of this repository.
This patch follows the same license as Skript (GPL-3.0).