Skript MYSQL error

Discussion in 'Skript' started by KrappySGS, Apr 19, 2017.

  1. Hello! I was trying to use sql in skript, but I get this error:
    Code (Text):
    Database features are disabled until the script has SQL credentials associated with it.
    Log from console:
    Code (Text):

    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    [12:57:23 WARN]:        at sun.reflect.GeneratedConstructorAccessor103.newInstance(Unknown Source)
    [12:57:23 WARN]:        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    [12:57:23 WARN]:        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    [12:57:23 WARN]:        at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
    [12:57:23 WARN]:        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:989)
    [12:57:23 WARN]:        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:341)
    [12:57:23 WARN]:        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2251)
    [12:57:23 WARN]:        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2284)
    [12:57:23 WARN]:        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2083)
    [12:57:23 WARN]:        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:806)
    [12:57:23 WARN]:        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    [12:57:23 WARN]:        at sun.reflect.GeneratedConstructorAccessor100.newInstance(Unknown Source)
    [12:57:23 WARN]:        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    [12:57:23 WARN]:        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    [12:57:23 WARN]:        at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
    [12:57:23 WARN]:        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:410)
    [12:57:23 WARN]:        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:328)
    [12:57:23 WARN]:        at java.sql.DriverManager.getConnection(DriverManager.java:664)
    [12:57:23 WARN]:        at java.sql.DriverManager.getConnection(DriverManager.java:247)
    [12:57:23 WARN]:        at com.w00tmast3r.skquery.db.ScriptCredentials.validate(ScriptCredentials.java:69)
    [12:57:23 WARN]:        at com.w00tmast3r.skquery.db.ScriptCredentials.setPassword(ScriptCredentials.java:36)
    [12:57:23 WARN]:        at com.w00tmast3r.skquery.elements.effects.EffOptionSQLPassword.register(EffOptionSQLPassword.java:20)
    [12:57:23 WARN]:        at com.w00tmast3r.skquery.elements.effects.base.Pragma.init(Pragma.java:24)
    [12:57:23 WARN]:        at com.w00tmast3r.skquery.elements.effects.base.OptionsPragma.init(OptionsPragma.java:18)
    [12:57:23 WARN]:        at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:249)
    [12:57:23 WARN]:        at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:176)
    [12:57:23 WARN]:        at ch.njol.skript.lang.Statement.parse(Statement.java:61)
    [12:57:23 WARN]:        at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:754)
    [12:57:23 WARN]:        at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:513)
    [12:57:23 WARN]:        at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:271)
    [12:57:23 WARN]:        at ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:167)
    [12:57:23 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    [12:57:23 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141)
    [12:57:23 WARN]:        at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchCommand(CraftServer.java:650)
    [12:57:23 WARN]:        at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchServerCommand(CraftServer.java:636)
    [12:57:23 WARN]:        at net.minecraft.server.v1_11_R1.DedicatedServer.aM(DedicatedServer.java:437)
    [12:57:23 WARN]:        at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:400)
    [12:57:23 WARN]:        at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:678)
    [12:57:23 WARN]:        at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:576)
    [12:57:23 WARN]:        at java.lang.Thread.run(Thread.java:745)
    [12:57:23 WARN]: Caused by: java.net.ConnectException: Connection refused (Connection refused)
    [12:57:23 WARN]:        at java.net.PlainSocketImpl.socketConnect(Native Method)
    [12:57:23 WARN]:        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    [12:57:23 WARN]:        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    [12:57:23 WARN]:        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    [12:57:23 WARN]:        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    [12:57:23 WARN]:        at java.net.Socket.connect(Socket.java:589)
    [12:57:23 WARN]:        at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)
    [12:57:23 WARN]:        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:300)
    [12:57:23 WARN]:        ... 34 more
    My script has this:
    Code (Text):

    script options:
        $ db url jdbc:mysql://localhost:3306/magic
        $ db username root
        $ db password [my password]
     
    The server is hosted on a Ubuntu 14.04 machine

    Thanks for reading, I hope someone can help me :p
     
  2. md_5

    Administrator Developer

    Is your mysql up and working with other plugins?
     
  3. I just tried using it with AuthMe and it seems like it doesn't work.
    Could it be because the password contains "-"?
    I will try to reinstall MySQL, thanks for answering though.
     
  4. Hi,

    there's an issue with your MySQL instance. Check your syslogs file in "/var/log/" and try executing "service mysql status" command.

    - Chris
     
    #4 LeVence, Apr 19, 2017
    Last edited: Apr 19, 2017
  5. For use MYSQL in skript is different that java ,
    Its necessary to have one Database for To have a container of data..
    If you not have database for MYSQL , the plugin dont work , And you will get the db error in the console.
    Like the one shown in the picture

    If you need help with the database, I can help you a while using MYSQL, SQLite and MongoDb, in skript!
    regards
     
  6. He already specified database called "magic" in that script options section.
    .. means that his Java server isn't able to establish a connection to the provided SQL server. It's not depending on his password or database.
     
  7. Oh, I'm sorry for not answering back to this thread. I fixed it. It seems like it was just an error from MySQL. I had installed it wrong, but I fixed it. Thanks for looking over though.
     
    • Like Like x 1
    • Friendly Friendly x 1