Setting up CoreProtect

Discussion in 'Bukkit Help' started by ChypRiotE, Jul 24, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    ChypRiotE

    Hi, I'm trying to setup CoreProtect so that it use a SQL database to log datas.
    I've been able to install the plugin fine, enabled MySQL in the config, and entered my informations, which seems to be correct since I used them in the web interface and it seems to manage to connect itself (obviously showing an
    Isn't the plugin supposed to create the database itself ? Or do I have to create them manually ?

    The database I'm using is not hosted on the same server than my minecraft server, is it the reason why it doesn't work ?
     
  2. Offline

    LHammonds

    It is quite possible the ID you are using does not have rights to create the tables. And yes, CoreProtect will setup the tables if it has rights to do so.

    LHammonds
     
  3. Offline

    ChypRiotE

    I'm pretty sure that those ids have the rights to create tables. That's the one I use to log into PHPMyadmin, and I created a few tables earlier today. Is there a way to check it ?
    However, if it was the case that I don't have the rights, how can I get them ? Or is there a way to bypass it, for example, by manually creating the databases ? Or using a .sql file to generate them ?
     
  4. Offline

    LHammonds

    What version of CoreProtect are you using?

    EDIT: I just tested CoreProtect 2.0.9 on Craftbukkit 1.7.9. Started it up, let it generate its config files, stopped the server, edited CoreProtect config to use MySQL with an ID with sufficient access to the database, started the server and the co_* tables were created automatically...no errors in console. The user account had all privileges to the database except for GRANT.

    Here is an export of the database table structure:
    Code:
    -- phpMyAdmin SQL Dump
    -- version 3.4.10.1deb1
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Jul 24, 2014 at 02:33 PM
    -- Server version: 5.5.38
    -- PHP Version: 5.3.10-1ubuntu3.13
     
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    SET time_zone = "+00:00";
     
    --
    -- Database: `derpriot`
    --
     
    -- --------------------------------------------------------
     
    --
    -- Table structure for table `co_block`
    --
     
    CREATE TABLE IF NOT EXISTS `co_block` (
      `rowid` int(10) NOT NULL AUTO_INCREMENT,
      `time` int(10) DEFAULT NULL,
      `user` int(8) DEFAULT NULL,
      `wid` int(4) DEFAULT NULL,
      `x` int(8) DEFAULT NULL,
      `y` int(3) DEFAULT NULL,
      `z` int(8) DEFAULT NULL,
      `type` int(6) DEFAULT NULL,
      `data` int(8) DEFAULT NULL,
      `meta` blob,
      `action` int(2) DEFAULT NULL,
      `rolled_back` tinyint(1) DEFAULT NULL,
      PRIMARY KEY (`rowid`),
      KEY `wid` (`wid`,`x`,`z`,`time`),
      KEY `user` (`user`,`time`),
      KEY `type` (`type`,`time`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
     
    -- --------------------------------------------------------
     
    --
    -- Table structure for table `co_chat`
    --
     
    CREATE TABLE IF NOT EXISTS `co_chat` (
      `rowid` int(8) NOT NULL AUTO_INCREMENT,
      `time` int(10) DEFAULT NULL,
      `user` int(8) DEFAULT NULL,
      `message` varchar(255) DEFAULT NULL,
      PRIMARY KEY (`rowid`),
      KEY `time` (`time`),
      KEY `user` (`user`,`time`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
     
    -- --------------------------------------------------------
     
    --
    -- Table structure for table `co_command`
    --
     
    CREATE TABLE IF NOT EXISTS `co_command` (
      `rowid` int(8) NOT NULL AUTO_INCREMENT,
      `time` int(10) DEFAULT NULL,
      `user` int(8) DEFAULT NULL,
      `message` varchar(255) DEFAULT NULL,
      PRIMARY KEY (`rowid`),
      KEY `time` (`time`),
      KEY `user` (`user`,`time`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
     
    -- --------------------------------------------------------
     
    --
    -- Table structure for table `co_container`
    --
     
    CREATE TABLE IF NOT EXISTS `co_container` (
      `rowid` int(10) NOT NULL AUTO_INCREMENT,
      `time` int(10) DEFAULT NULL,
      `user` int(8) DEFAULT NULL,
      `wid` int(4) DEFAULT NULL,
      `x` int(8) DEFAULT NULL,
      `y` int(3) DEFAULT NULL,
      `z` int(8) DEFAULT NULL,
      `type` int(6) DEFAULT NULL,
      `data` int(6) DEFAULT NULL,
      `amount` int(4) DEFAULT NULL,
      `meta` int(2) DEFAULT NULL,
      `metadata` blob,
      `action` int(2) DEFAULT NULL,
      `rolled_back` tinyint(1) DEFAULT NULL,
      PRIMARY KEY (`rowid`),
      KEY `wid` (`wid`,`x`,`z`,`time`),
      KEY `user` (`user`,`time`),
      KEY `type` (`type`,`time`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
     
    -- --------------------------------------------------------
     
    --
    -- Table structure for table `co_entity`
    --
     
    CREATE TABLE IF NOT EXISTS `co_entity` (
      `rowid` int(8) NOT NULL AUTO_INCREMENT,
      `time` int(10) DEFAULT NULL,
      `data` blob,
      PRIMARY KEY (`rowid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
     
    -- --------------------------------------------------------
     
    --
    -- Table structure for table `co_session`
    --
     
    CREATE TABLE IF NOT EXISTS `co_session` (
      `rowid` int(8) NOT NULL AUTO_INCREMENT,
      `time` int(10) DEFAULT NULL,
      `user` int(8) DEFAULT NULL,
      `wid` int(4) DEFAULT NULL,
      `x` int(8) DEFAULT NULL,
      `y` int(3) DEFAULT NULL,
      `z` int(8) DEFAULT NULL,
      `action` int(1) DEFAULT NULL,
      PRIMARY KEY (`rowid`),
      KEY `wid` (`wid`,`x`,`z`,`time`),
      KEY `action` (`action`,`time`),
      KEY `user` (`user`,`time`),
      KEY `time` (`time`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
     
    -- --------------------------------------------------------
     
    --
    -- Table structure for table `co_sign`
    --
     
    CREATE TABLE IF NOT EXISTS `co_sign` (
      `rowid` int(8) NOT NULL AUTO_INCREMENT,
      `time` int(10) DEFAULT NULL,
      `user` int(8) DEFAULT NULL,
      `wid` int(4) DEFAULT NULL,
      `x` int(8) DEFAULT NULL,
      `y` int(3) DEFAULT NULL,
      `z` int(8) DEFAULT NULL,
      `line_1` varchar(100) DEFAULT NULL,
      `line_2` varchar(100) DEFAULT NULL,
      `line_3` varchar(100) DEFAULT NULL,
      `line_4` varchar(100) DEFAULT NULL,
      PRIMARY KEY (`rowid`),
      KEY `wid` (`wid`,`x`,`z`,`y`,`time`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
     
    -- --------------------------------------------------------
     
    --
    -- Table structure for table `co_skull`
    --
     
    CREATE TABLE IF NOT EXISTS `co_skull` (
      `rowid` int(8) NOT NULL AUTO_INCREMENT,
      `time` int(10) DEFAULT NULL,
      `type` int(2) DEFAULT NULL,
      `data` int(1) DEFAULT NULL,
      `rotation` int(2) DEFAULT NULL,
      `owner` varchar(16) DEFAULT NULL,
      PRIMARY KEY (`rowid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
     
    -- --------------------------------------------------------
     
    --
    -- Table structure for table `co_user`
    --
     
    CREATE TABLE IF NOT EXISTS `co_user` (
      `rowid` int(8) NOT NULL AUTO_INCREMENT,
      `time` int(10) DEFAULT NULL,
      `user` varchar(32) DEFAULT NULL,
      PRIMARY KEY (`rowid`),
      KEY `user` (`user`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
     
    -- --------------------------------------------------------
     
    --
    -- Table structure for table `co_version`
    --
     
    CREATE TABLE IF NOT EXISTS `co_version` (
      `rowid` int(8) NOT NULL AUTO_INCREMENT,
      `time` int(10) DEFAULT NULL,
      `version` varchar(16) DEFAULT NULL,
      PRIMARY KEY (`rowid`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
     
    -- --------------------------------------------------------
     
    --
    -- Table structure for table `co_world`
    --
     
    CREATE TABLE IF NOT EXISTS `co_world` (
      `rowid` int(8) NOT NULL AUTO_INCREMENT,
      `id` int(8) DEFAULT NULL,
      `world` varchar(255) DEFAULT NULL,
      PRIMARY KEY (`rowid`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
    
     
  5. Offline

    ChypRiotE

    I didn't even think about checking the console... There was indeed some errors, and it seems that my host allows sql connections from his own servers only. I'll have to find another way then.
    Thanks for your help !
     
  6. Offline

    LHammonds

    Ya, he probably created the ID using something like Example #1 in my database tutorial.

    LHammonds
     
Thread Status:
Not open for further replies.

Share This Page