Skip to content

MySQL Syntax Error on Startup #55

@fenn96

Description

@fenn96

I'm getting a MySQL syntax error when trying to use the plugin. "[Bastion] Migration 1 ] Failed migration: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS bastion_type VARCHAR(40) DEFAULT 'citybastion'' at line 1".

My Minecraft version is the latest one, Spigot 1.13.2, but this doesn't seem to be an issue with my Minecraft version. The syntax is wrong in the MySQL.

[21:49:30] [Server thread/INFO]: [Bastion] Enabling Bastion v2.2.3
[21:49:30] [Server thread/INFO]: [Bastion] Loading Bastion type citybastion
[21:49:30] [Server thread/INFO]: [Bastion] Bastion type citybastion loaded: citybastion: LEGACY_NETHER_WART_BLOCK(0) name:City Bastion lore[1]: [This bastion will protect your plot] scale[100->0.2 50cb wm86400000 cd2000 ed0 rd0 iYtrue bte1 doRtrue oDDfalse pearls[false] elytra[true: rMtrue sc1 dobtrue Dobfalse eobtrue eos0.0]
[21:49:30] [Server thread/INFO]: [Bastion] Loading Bastion type claimbastion
[21:49:30] [Server thread/INFO]: [Bastion] Bastion type claimbastion loaded: claimbastion: LEGACY_BONE_BLOCK(0) name:Claim Bastion lore[1]: [This bastion will protect your claims] scale[100->0.2 300r wm86400000 cd2000 ed0 rd0 iYtrue bte1 doRfalse oDDtrue pearls[false] elytra[false]
[21:49:30] [Server thread/INFO]: [Bastion] Loading Bastion type bastion
[21:49:30] [Server thread/INFO]: [Bastion] Bastion type bastion loaded: bastion: LEGACY_SPONGE(0) name:Bastion lore[1]: [this one is hellaz] scale[100->0.2 10r wm86400000 cd2000 ed0 rd0 iYtrue bte1 doRtrue oDDfalse pearls[true: midtrue rMtrue sc2 cobtrue dfBtrue apofalse] elytra[true: rMtrue sc1 dobfalse Dobtrue eobtrue eos0.0]
[21:49:30] [Server thread/INFO]: [Bastion] Preparing to generate ConnectionPool for Bastion.
[21:49:30] [Server thread/INFO]: [Bastion] Connecting to minecraft@localhost:3,306 using root
[21:49:30] [Server thread/WARN]: Wed Mar 13 21:49:30 EDT 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
[21:49:30] [Server thread/INFO]: [Bastion] Lock acquired, proceeding.
[21:49:30] [Server thread/INFO]: [Bastion] Bastion database is behind, 3 migrations found
[21:49:30] [Server thread/INFO]: [Bastion] Migration 1 ] Applying
[21:49:30] [Server thread/ERROR]: [Bastion] Migration 1 ] Failed migration: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS bastion_type VARCHAR(40) DEFAULT 'citybastion'' at line 1
[21:49:30] [Server thread/ERROR]: [Bastion] Full Error:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS bastion_type VARCHAR(40) DEFAULT 'citybastion'' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_201]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_201]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_201]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_201]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at com.mysql.jdbc.Util.getInstance(Util.java:408) ~[spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944) ~[spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978) ~[spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914) ~[spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530) ~[spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683) ~[spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2491) ~[spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1552) ~[spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2607) ~[spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1480) ~[spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:120) ~[CivModCore-1.7.0.jar:?]
at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java) ~[CivModCore-1.7.0.jar:?]
at vg.civcraft.mc.civmodcore.dao.ManagedDatasource.doMigration(ManagedDatasource.java:359) [CivModCore-1.7.0.jar:?]
at vg.civcraft.mc.civmodcore.dao.ManagedDatasource.doMigrations(ManagedDatasource.java:323) [CivModCore-1.7.0.jar:?]
at vg.civcraft.mc.civmodcore.dao.ManagedDatasource.updateDatabase(ManagedDatasource.java:295) [CivModCore-1.7.0.jar:?]
at isaac.bastion.Bastion.setupDatabase(Bastion.java:93) [Bastion-2.2.3%20(3).jar:?]
at isaac.bastion.Bastion.onEnable(Bastion.java:40) [Bastion-2.2.3%20(3).jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:254) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugin(CraftServer.java:436) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugins(CraftServer.java:350) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at net.minecraft.server.v1_13_R2.MinecraftServer.l(MinecraftServer.java:580) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:542) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:420) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at net.minecraft.server.v1_13_R2.DedicatedServer.init(DedicatedServer.java:294) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:698) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_201]
[21:49:30] [Server thread/INFO]: [Bastion] Migration 1 ] Failed.
[21:49:30] [Server thread/WARN]: [Bastion] Bastion failed to apply updates.
[21:49:30] [Server thread/INFO]: [Bastion] Lock released.
[21:49:30] [Server thread/WARN]: [Bastion] Failed to update database, stopping bastion
[21:49:30] [Server thread/INFO]: [Bastion] Disabling Bastion v2.2.3
[21:49:30] [Server thread/ERROR]: Error occurred while disabling Bastion v2.2.3 (Is it up to date?)
java.lang.NullPointerException: null
at isaac.bastion.Bastion.onDisable(Bastion.java:54) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:256) ~[spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:364) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:423) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at isaac.bastion.Bastion.setupDatabase(Bastion.java:95) [Bastion-2.2.3%20(3).jar:?]
at isaac.bastion.Bastion.onEnable(Bastion.java:40) [Bastion-2.2.3%20(3).jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:254) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugin(CraftServer.java:436) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugins(CraftServer.java:350) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at net.minecraft.server.v1_13_R2.MinecraftServer.l(MinecraftServer.java:580) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:542) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:420) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at net.minecraft.server.v1_13_R2.DedicatedServer.init(DedicatedServer.java:294) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:698) [spigot.jar:git-Spigot-3cb9dcb-0f708cb]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_201]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions