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(
    [12:57:23 WARN]:        at java.lang.reflect.Constructor.newInstance(
    [12:57:23 WARN]:        at com.mysql.jdbc.Util.handleNewInstance(
    [12:57:23 WARN]:        at com.mysql.jdbc.SQLError.createCommunicationsException(
    [12:57:23 WARN]:        at com.mysql.jdbc.MysqlIO.<init>(
    [12:57:23 WARN]:        at com.mysql.jdbc.ConnectionImpl.coreConnect(
    [12:57:23 WARN]:        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(
    [12:57:23 WARN]:        at com.mysql.jdbc.ConnectionImpl.createNewIO(
    [12:57:23 WARN]:        at com.mysql.jdbc.ConnectionImpl.<init>(
    [12:57:23 WARN]:        at com.mysql.jdbc.JDBC4Connection.<init>(
    [12:57:23 WARN]:        at sun.reflect.GeneratedConstructorAccessor100.newInstance(Unknown Source)
    [12:57:23 WARN]:        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
    [12:57:23 WARN]:        at java.lang.reflect.Constructor.newInstance(
    [12:57:23 WARN]:        at com.mysql.jdbc.Util.handleNewInstance(
    [12:57:23 WARN]:        at com.mysql.jdbc.ConnectionImpl.getInstance(
    [12:57:23 WARN]:        at com.mysql.jdbc.NonRegisteringDriver.connect(
    [12:57:23 WARN]:        at java.sql.DriverManager.getConnection(
    [12:57:23 WARN]:        at java.sql.DriverManager.getConnection(
    [12:57:23 WARN]:        at com.w00tmast3r.skquery.db.ScriptCredentials.validate(
    [12:57:23 WARN]:        at com.w00tmast3r.skquery.db.ScriptCredentials.setPassword(
    [12:57:23 WARN]:        at com.w00tmast3r.skquery.elements.effects.EffOptionSQLPassword.register(
    [12:57:23 WARN]:        at com.w00tmast3r.skquery.elements.effects.base.Pragma.init(
    [12:57:23 WARN]:        at com.w00tmast3r.skquery.elements.effects.base.OptionsPragma.init(
    [12:57:23 WARN]:        at ch.njol.skript.lang.SkriptParser.parse(
    [12:57:23 WARN]:        at ch.njol.skript.lang.SkriptParser.parse(
    [12:57:23 WARN]:        at ch.njol.skript.lang.Statement.parse(
    [12:57:23 WARN]:        at ch.njol.skript.ScriptLoader.loadItems(
    [12:57:23 WARN]:        at ch.njol.skript.ScriptLoader.loadScript(
    [12:57:23 WARN]:        at ch.njol.skript.ScriptLoader.loadScripts(
    [12:57:23 WARN]:        at ch.njol.skript.SkriptCommand.onCommand(
    [12:57:23 WARN]:        at org.bukkit.command.PluginCommand.execute(
    [12:57:23 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(
    [12:57:23 WARN]:        at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchCommand(
    [12:57:23 WARN]:        at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchServerCommand(
    [12:57:23 WARN]:        at net.minecraft.server.v1_11_R1.DedicatedServer.aM(
    [12:57:23 WARN]:        at net.minecraft.server.v1_11_R1.DedicatedServer.D(
    [12:57:23 WARN]:        at net.minecraft.server.v1_11_R1.MinecraftServer.C(
    [12:57:23 WARN]:        at
    [12:57:23 WARN]:        at
    [12:57:23 WARN]: Caused by: Connection refused (Connection refused)
    [12:57:23 WARN]:        at Method)
    [12:57:23 WARN]:        at
    [12:57:23 WARN]:        at
    [12:57:23 WARN]:        at
    [12:57:23 WARN]:        at
    [12:57:23 WARN]:        at
    [12:57:23 WARN]:        at com.mysql.jdbc.StandardSocketFactory.connect(
    [12:57:23 WARN]:        at com.mysql.jdbc.MysqlIO.<init>(
    [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!
  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