CommandAliases icon indicating copy to clipboard operation
CommandAliases copied to clipboard

MySQL error after enabling mysql database

Open CandiMiiS opened this issue 2 years ago • 1 comments

[Server thread/ERROR]: BLOB/TEXT column 'key' used in key specification without a key length [Server thread/INFO]: [STDERR]: java.sql.SQLSyntaxErrorException: BLOB/TEXT column 'key' used in key specification without a key length [Server thread/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) [Server thread/INFO]: [STDERR]: at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) [Server thread/INFO]: [STDERR]: at com.mysql.cj.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1335) [Server thread/INFO]: [STDERR]: at com.mysql.cj.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2085) [Server thread/INFO]: [STDERR]: at com.mysql.cj.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1246) [Server thread/INFO]: [STDERR]: at me.flashyreese.mods.commandaliases.storage.database.mysql.MySQLImpl.open(MySQLImpl.java:36) [Server thread/INFO]: [STDERR]: at me.flashyreese.mods.commandaliases.command.loader.CommandAliasesLoader.lambda$registerCommandAliases$1(CommandAliasesLoader.java:73) [Server thread/INFO]: [STDERR]: at net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents.lambda$static$2(ServerLifecycleEvents.java:49) [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.handler$zcn000$afterSetupServer(MinecraftServer.java:2824) [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:655) [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:264) [Server thread/INFO]: [STDERR]: at java.base/java.lang.Thread.run(Thread.java:833)

CandiMiiS avatar Jan 24 '23 12:01 CandiMiiS

Met the same issue with MySQL8, error log shown below:

[22:12:21] [Server thread/ERROR]: BLOB/TEXT column 'key' used in key specification without a key length
[22:12:21] [Server thread/INFO]: [STDERR]: java.sql.SQLSyntaxErrorException: BLOB/TEXT column 'key' used in key specification without a key length
[22:12:21] [Server thread/INFO]: [STDERR]:      at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:121)
[22:12:21] [Server thread/INFO]: [STDERR]:      at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
[22:12:21] [Server thread/INFO]: [STDERR]:      at com.mysql.cj.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1334)
[22:12:21] [Server thread/INFO]: [STDERR]:      at com.mysql.cj.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2084)
[22:12:21] [Server thread/INFO]: [STDERR]:      at com.mysql.cj.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1245)
[22:12:21] [Server thread/INFO]: [STDERR]:      at me.flashyreese.mods.commandaliases.storage.database.mysql.MySQLImpl.open(MySQLImpl.java:36)
[22:12:21] [Server thread/INFO]: [STDERR]:      at me.flashyreese.mods.commandaliases.command.loader.CommandAliasesLoader.lambda$registerCommandAliases$1(CommandAliasesLoader.java:74)
[22:12:21] [Server thread/INFO]: [STDERR]:      at net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents.lambda$static$2(ServerLifecycleEvents.java:49)
[22:12:21] [Server thread/INFO]: [STDERR]:      at net.minecraft.server.MinecraftServer.handler$bid000$fabric-lifecycle-events-v1$afterSetupServer(MinecraftServer.java:6842)
[22:12:21] [Server thread/INFO]: [STDERR]:      at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:650)
[22:12:21] [Server thread/INFO]: [STDERR]:      at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:265)
[22:12:21] [Server thread/INFO]: [STDERR]:      at java.base/java.lang.Thread.run(Thread.java:842)

zayne-wang avatar Apr 16 '24 14:04 zayne-wang