so i'm trying to update my MySQL database for worldguard and at first i had no idea how to go about this but after reading up previous people in the past having the same issue i more or less figured out i had to run a query this is the query i had to run: Code: SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL'; ALTER TABLE `region_cuboid` DROP FOREIGN KEY `fk_region_cuboid_region` ; ALTER TABLE `region_flag` DROP FOREIGN KEY `fk_flags_region1` ; ALTER TABLE `region_groups` DROP FOREIGN KEY `fk_region_groups_region` ; ALTER TABLE `region_players` DROP FOREIGN KEY `fk_region_players_user` , DROP FOREIGN KEY `fk_region_players_region` ; ALTER TABLE `region_poly2d` DROP FOREIGN KEY `fk_region_poly2d_region` ; ALTER TABLE `region_poly2d_point` DROP FOREIGN KEY `fk_region_poly2d_point_region_poly2d` ; ALTER TABLE `group` COLLATE = utf8_bin ; ALTER TABLE `region_cuboid` COLLATE = utf8_bin , ADD COLUMN `world_id` INT(10) UNSIGNED NOT NULL AFTER `region_id` , CHANGE COLUMN `min_x` `min_x` BIGINT(20) NOT NULL AFTER `world_id` , CHANGE COLUMN `min_y` `min_y` BIGINT(20) NOT NULL AFTER `min_x` , CHANGE COLUMN `max_x` `max_x` BIGINT(20) NOT NULL AFTER `min_z` , CHANGE COLUMN `max_y` `max_y` BIGINT(20) NOT NULL AFTER `max_x` , ADD CONSTRAINT `fk_region_cuboid_region` FOREIGN KEY (`region_id` , `world_id` ) REFERENCES `region` (`id` , `world_id` ) ON DELETE CASCADE ON UPDATE CASCADE , DROP PRIMARY KEY , ADD PRIMARY KEY (`region_id`, `world_id`) ; ALTER TABLE `region_flag` COLLATE = utf8_bin , ADD COLUMN `world_id` INT(10) UNSIGNED NOT NULL AFTER `region_id` , CHANGE COLUMN `flag` `flag` VARCHAR(45) CHARACTER SET 'utf8' COLLATE 'utf8_bin' NOT NULL , ADD CONSTRAINT `fk_flags_region` FOREIGN KEY (`region_id` , `world_id` ) REFERENCES `region` (`id` , `world_id` ) ON DELETE CASCADE ON UPDATE CASCADE , DROP INDEX `fk_flags_region` , ADD INDEX `fk_flags_region` (`region_id` ASC, `world_id` ASC) ; ALTER TABLE `region_groups` COLLATE = utf8_bin , ADD COLUMN `world_id` INT(10) UNSIGNED NOT NULL AFTER `region_id` , DROP FOREIGN KEY `fk_region_groups_group` ; ALTER TABLE `region_groups` ADD CONSTRAINT `fk_region_groups_group` FOREIGN KEY (`group_id` ) REFERENCES `group` (`id` ) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `fk_region_groups_region` FOREIGN KEY (`region_id` , `world_id` ) REFERENCES `region` (`id` , `world_id` ) ON DELETE CASCADE ON UPDATE CASCADE , DROP PRIMARY KEY , ADD PRIMARY KEY (`region_id`, `world_id`, `group_id`) ; ALTER TABLE `region_players` COLLATE = utf8_bin , ADD COLUMN `world_id` INT(10) UNSIGNED NOT NULL AFTER `region_id` , ADD CONSTRAINT `fk_region_users_region` FOREIGN KEY (`region_id` , `world_id` ) REFERENCES `region` (`id` , `world_id` ) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `fk_region_users_user` FOREIGN KEY (`user_id` ) REFERENCES `user` (`id` ) ON DELETE CASCADE ON UPDATE CASCADE , DROP PRIMARY KEY , ADD PRIMARY KEY (`region_id`, `world_id`, `user_id`) , ADD INDEX `fk_region_users_user` (`user_id` ASC) , DROP INDEX `fk_region_players_user` ; ALTER TABLE `region_poly2d` COLLATE = utf8_bin , ADD COLUMN `world_id` INT(10) UNSIGNED NOT NULL AFTER `region_id` , CHANGE COLUMN `min_y` `min_y` INT(11) NOT NULL AFTER `world_id` , ADD CONSTRAINT `fk_region_poly2d_region` FOREIGN KEY (`region_id` , `world_id` ) REFERENCES `region` (`id` , `world_id` ) ON DELETE CASCADE ON UPDATE CASCADE , DROP PRIMARY KEY , ADD PRIMARY KEY (`region_id`, `world_id`) ; ALTER TABLE `region_poly2d_point` COLLATE = utf8_bin , ADD COLUMN `world_id` INT(10) UNSIGNED NOT NULL AFTER `region_id` , CHANGE COLUMN `x` `x` BIGINT(20) NOT NULL AFTER `world_id` , ADD CONSTRAINT `fk_region_poly2d_point_region_poly2d` FOREIGN KEY (`region_id` , `world_id` ) REFERENCES `region_poly2d` (`region_id` , `world_id` ) ON DELETE CASCADE ON UPDATE CASCADE , DROP INDEX `fk_region_poly2d_point_region_poly2d` , ADD INDEX `fk_region_poly2d_point_region_poly2d` (`region_id` ASC, `world_id` ASC) ; ALTER TABLE `user` COLLATE = utf8_bin ; ALTER TABLE `world` COLLATE = utf8_bin ; UPDATE `region_cuboid` AS c SET c.`world_id` = (SELECT p.`world_id` FROM `region` AS p WHERE p.`id` = c.`region_id`); UPDATE `region_flag` AS c SET c.`world_id` = (SELECT p.`world_id` FROM `region` AS p WHERE p.`id` = c.`region_id`); UPDATE `region_groups` AS c SET c.`world_id` = (SELECT p.`world_id` FROM `region` AS p WHERE p.`id` = c.`region_id`); UPDATE `region_players` AS c SET c.`world_id` = (SELECT p.`world_id` FROM `region` AS p WHERE p.`id` = c.`region_id`); UPDATE `region_poly2d` AS c SET c.`world_id` = (SELECT p.`world_id` FROM `region` AS p WHERE p.`id` = c.`region_id`); UPDATE `region_poly2d_point` AS c SET c.`world_id` = (SELECT p.`world_id` FROM `region` AS p WHERE p.`id` = c.`region_id`); SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; however after running this thread after pointing it to the correct database all i'm getting in the output log is : Code: 0 row(s) affected 0 row(s) affected 0 row(s) affected Error Code: 1146. Table 'worldguard_hub.region_cuboid' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_flag' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_groups' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_players' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_poly2d' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_poly2d_point' doesn't exist Error Code: 1146. Table 'worldguard_hub.group' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_cuboid' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_flag' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_groups' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_groups' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_players' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_poly2d' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_poly2d_point' doesn't exist Error Code: 1146. Table 'worldguard_hub.user' doesn't exist Error Code: 1146. Table 'worldguard_hub.world' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_cuboid' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_flag' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_groups' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_players' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_poly2d' doesn't exist Error Code: 1146. Table 'worldguard_hub.region_poly2d_point' doesn't exist 0 row(s) affected 0 row(s) affected 0 row(s) affected now obviously i'm aware this means the table's do not exist but surely worldguard would have created them and i shouldn't have to.. any ideas? i've only recently got into the whole MySQL thing so all help is appreciated.
Can we see your config.yml for WorldGuard (just put "xx" in place of personal date, such as the MySQL password) Also the problem might be caused by a typo, as this just happened to me with mine.
Code: # # WorldGuard's main configuration file # # This is the global configuration file. Anything placed into here will # be applied to all worlds. However, each world has its own configuration # file to allow you to replace most settings in here for that world only. # # About editing this file: # - DO NOT USE TABS. You MUST use spaces or Bukkit will complain. If # you use an editor like Notepad++ (recommended for Windows users), you # must configure it to "replace tabs with spaces." In Notepad++, this can # be changed in Settings > Preferences > Language Menu. # - Don't get rid of the indents. They are indented so some entries are # in categories (like "enforce-single-session" is in the "protection" # category. # - If you want to check the format of this file before putting it # into WorldGuard, paste it into http://yaml-online-parser.appspot.com/ # and see if it gives "ERROR:". # - Lines starting with # are comments and so they are ignored. # host-keys: {} regions: use-scheduler: true uuid-migration: perform-on-next-start: false keep-names-that-lack-uuids: true use-creature-spawn-event: true sql: use: true dsn: jdbc:mysql://localhost/worldguard_hub username: xx password: xx table-prefix: wg_ enable: true invincibility-removes-mobs: false fake-player-build-override: true explosion-flags-block-entity-damage: true high-frequency-flags: false protect-against-liquid-flow: false wand: 334 max-claim-volume: 30000 claim-only-inside-existing-regions: false max-region-count-per-player: default: 7 auto-invincible: false auto-invincible-group: false auto-no-drowning-group: false use-player-move-event: true use-player-teleports: true security: deop-everyone-on-join: false block-in-game-op-command: false summary-on-start: true op-permissions: true build-permission-nodes: enable: false deny-message: '&eSorry, but you are not permitted to do that here.' event-handling: block-entity-spawns-with-untraceable-cause: false interaction-whitelist: [] emit-block-use-at-feet: [] protection: item-durability: true remove-infinite-stacks: false disable-xp-orb-drops: false disable-obsidian-generators: false gameplay: block-potions: [] block-potions-overly-reliably: false simulation: sponge: enable: false radius: 3 redstone: false default: pumpkin-scuba: false disable-health-regain: false physics: no-physics-gravel: false no-physics-sand: false vine-like-rope-ladders: false allow-portal-anywhere: false disable-water-damage-blocks: [] ignition: block-tnt: false block-tnt-block-damage: false block-lighter: false fire: disable-lava-fire-spread: true disable-all-fire-spread: false disable-fire-spread-blocks: [] lava-spread-blocks: [] mobs: block-creeper-explosions: false block-creeper-block-damage: false block-wither-explosions: false block-wither-block-damage: false block-wither-skull-explosions: false block-wither-skull-block-damage: false block-enderdragon-block-damage: false block-enderdragon-portal-creation: false block-fireball-explosions: false block-fireball-block-damage: false anti-wolf-dumbness: false allow-tamed-spawns: true disable-enderman-griefing: false disable-snowman-trails: false block-painting-destroy: false block-item-frame-destroy: false block-plugin-spawning: true block-above-ground-slimes: false block-other-explosions: false block-zombie-door-destruction: false block-creature-spawn: [] player-damage: disable-fall-damage: false disable-lava-damage: false disable-fire-damage: false disable-lightning-damage: false disable-drowning-damage: false disable-suffocation-damage: false disable-contact-damage: false teleport-on-suffocation: false disable-void-damage: false teleport-on-void-falling: false disable-explosion-damage: false disable-mob-damage: false disable-death-messages: false chest-protection: enable: false disable-off-check: false crops: disable-creature-trampling: false disable-player-trampling: false weather: prevent-lightning-strike-blocks: [] disable-lightning-strike-fire: false disable-thunderstorm: false disable-weather: false disable-pig-zombification: false disable-powered-creepers: false always-raining: false always-thundering: false dynamics: disable-mushroom-spread: false disable-ice-melting: false disable-snow-melting: false disable-snow-formation: false disable-ice-formation: false disable-leaf-decay: false disable-grass-growth: false disable-mycelium-spread: false disable-vine-growth: false disable-soil-dehydration: false snow-fall-blocks: [] blacklist: use-as-whitelist: false logging: console: enable: true database: enable: false dsn: jdbc:mysql://localhost:3306/minecraft user: root pass: '' table: blacklist_events file: enable: false path: worldguard/logs/%Y-%m-%d.log open-files: 10
so this is the error my console throws up every time i bootup the server: Code: [20:52:43 WARN]: You need to update your database to the latest version. Please see region_storage_update_20110325.sql [20:52:43 WARN]: at com.sk89q.worldguard.protection.databases.MySQLDataba se.<init>(MySQLDatabase.java:79) [20:52:43 WARN]: at com.sk89q.worldguard.protection.GlobalRegionManager.c reate(GlobalRegionManager.java:155) [20:52:43 WARN]: at com.sk89q.worldguard.protection.GlobalRegionManager.l oad(GlobalRegionManager.java:130) [20:52:43 WARN]: at com.sk89q.worldguard.protection.GlobalRegionManager.p reload(GlobalRegionManager.java:194) [20:52:43 WARN]: at com.sk89q.worldguard.bukkit.WorldGuardPlugin.onEnable (WorldGuardPlugin.java:160) [20:52:43 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug in.java:321) [20:52:43 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin( JavaPluginLoader.java:335) [20:52:43 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si mplePluginManager.java:405) [20:52:43 WARN]: at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin (CraftServer.java:356) [20:52:43 WARN]: at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlug ins(CraftServer.java:316) [20:52:43 WARN]: at net.minecraft.server.v1_8_R1.MinecraftServer.q(Minecr aftServer.java:402) [20:52:43 WARN]: at net.minecraft.server.v1_8_R1.MinecraftServer.k(Minecr aftServer.java:370) [20:52:43 WARN]: at net.minecraft.server.v1_8_R1.MinecraftServer.a(Minecr aftServer.java:325) [20:52:43 WARN]: at net.minecraft.server.v1_8_R1.DedicatedServer.init(Ded icatedServer.java:211) [20:52:43 WARN]: at net.minecraft.server.v1_8_R1.MinecraftServer.run(Mine craftServer.java:505) [20:52:43 WARN]: at java.lang.Thread.run(Unknown Source) after this error occurs it shuts the server down.
Delete your worldguard database in your MySQL server, then create a new one under the same name, that should hopefully fix the error. If it doesn't, we are at least getting closer to a fix.
so i deleted the database then remade it with the same name, then ran the server again to see if it would work but still nothing, it's as if it's not even getting as far as generating the tables within the database. and just to confirm i'm using worldguard 5.9 Okay fixed it.. so what I did was: manually ran the region_storage.sql query to generate the tables ran the region_storage_update_20110325.sql after this the server launched fine, only thing i had to do is turn off the safe updates feature in MySQL Workbench. Thanks for all the help @shades161