taylorkelly / BigBrother

GNU General Public License v3.0
29 stars 20 forks source link

BB doesn't create the tables in base. #9

Closed ololduck closed 13 years ago

ololduck commented 13 years ago

I dropped my old table "bbdata", and restarted the server, as BB would recreate it, along with the new bbworld base. Upon launch, the server.log says they are created. When i go to phpmyadmin, i see there are there, but not "usable".as for the 'minecraft' database, she is created, and the user minecraft has full access on it.

when i re-reboot the minecraft server, the following appears in the logs:

2011-02-26 18:39:35 [SEVERE] [BBROTHER] MySQL SQLException on Creation
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'minecraft'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.Util.getInstance(Util.java:381)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
    at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
    at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:718)
    at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at me.taylorkelly.bigbrother.datasource.ConnectionService.getConnection(ConnectionService.java:77)
    at me.taylorkelly.bigbrother.datasource.JDCConnectionDriver.connect(JDCConnectionDriver.java:41)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:207)
    at me.taylorkelly.bigbrother.datasource.ConnectionManager.createConnection(ConnectionManager.java:27)
    at me.taylorkelly.bigbrother.BigBrother.onEnable(BigBrother.java:95)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:79)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:60)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
2011-02-26 18:39:35 [SEVERE] [BBROTHER] Could not establish SQL connection. Disabling BigBrother

In the hope you will find an error in my installation, and not in the code, Druil.

DanielChesters commented 13 years ago

What are your configuration file (BigBrother.properties)? Have you set correctly mysqlUser and mysqlPass?

ololduck commented 13 years ago

Here:

MySQL = true   #If true, uses MySQL. If false, uses Sqlite
stickItem = 280   #The item used for /bb stick
mysqlDB = jdbc:mysql://localhost:3306/minecraft   #DB for MySQL (if applicable)
engine = INNODB   #Engine for the Database (INNODB is recommended)
autoWatch = true   #Automatically start watching players
defaultSearchRadius = 2   #Default search radius for bbhere and bbfind
restoreFire = false   #Restore fire when rolling back
flatFileLogs = false   #If true, will also log actions to .logs (one for each player)
mysqlPass = #pass#   #Password for MySQL db (if applicable)
mysqlUser = minecraft   #Username for MySQL db (if applicable)
maxRecords = 10000000   #The maximum number of records that you want in your database (-1 to disable)
cleanseAge = 7d    #The maximum age of items in the database (can be mixture of #d,h,m,s) (0s to disable)
sendDelay = 4   #Delay in seconds to batch send updates to database (4-5 recommended)

of course, #pass# is the password of the minecraft user. I double-checked it. recreated database/user, restarted minecraft server, always the same. Ah, and BB is the only plugin using this database.

I see now i forgot to congrat you for your awesome work! So... congrats =D

DanielChesters commented 13 years ago

Have you given good permission on your user to see and modify database?

ololduck commented 13 years ago

Found error. Not linked at all with minecraft and/or mods. MySQL didn't want to flush privileges. I will investigate on my side on this.

Thank you for your support, and keep up the good work!