Solved Hello! I got a question about mysql on my server

Discussion in 'Bukkit Help' started by SoufMeneer, Jul 12, 2018.

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

    SoufMeneer

    Hey there!

    I got a question. I started a while ago a server. I use permissionsex on my server for the permission. I want to connect with Mysql database. But I got a error... Someone Help me!!!

    This is my console error:
    Code:
    ========== UNABLE TO LOAD PERMISSIONS BACKEND =========
    Your configuration must be fixed before PEX will enable
    Details: Unable to connect to SQL database
    =======================================================
    ru.tehkode.permissions.exceptions.PermissionBackendException: Unable to connect to SQL database
        at ru.tehkode.permissions.backends.sql.SQLBackend.<init>(SQLBackend.java:118) ~[PermissionsEx-1.23.4.jar:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_172]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_172]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_172]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_172]
        at ru.tehkode.permissions.backends.PermissionBackend.getBackend(PermissionBackend.java:392) ~[PermissionsEx-1.23.4.jar:?]
        at ru.tehkode.permissions.backends.PermissionBackend.getBackend(PermissionBackend.java:367) ~[PermissionsEx-1.23.4.jar:?]
        at ru.tehkode.permissions.PermissionManager.createBackend(PermissionManager.java:624) ~[PermissionsEx-1.23.4.jar:?]
        at ru.tehkode.permissions.PermissionManager.setBackend(PermissionManager.java:606) ~[PermissionsEx-1.23.4.jar:?]
        at ru.tehkode.permissions.PermissionManager.initBackend(PermissionManager.java:693) ~[PermissionsEx-1.23.4.jar:?]
        at ru.tehkode.permissions.PermissionManager.<init>(PermissionManager.java:67) ~[PermissionsEx-1.23.4.jar:?]
        at ru.tehkode.permissions.bukkit.PermissionsEx.onEnable(PermissionsEx.java:175) [PermissionsEx-1.23.4.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:403) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:381) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:330) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.reload(CraftServer.java:752) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at org.bukkit.Bukkit.reload(Bukkit.java:525) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:27) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:648) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchServerCommand(CraftServer.java:634) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at net.minecraft.server.v1_12_R1.DedicatedServer.aP(DedicatedServer.java:444) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:407) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172]
    Caused by: java.sql.SQLException: Access denied for user 'soufikq299_SoufMeneer'@redacted (using password: YES)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:873) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1710) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1226) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2188) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2219) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2014) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:776) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_172]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_172]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_172]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_172]
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at ru.tehkode.libs.org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[?:?]
        at ru.tehkode.libs.org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) ~[?:?]
        at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) ~[?:?]
        at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ~[?:?]
        at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) ~[?:?]
        at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[?:?]
        at ru.tehkode.permissions.backends.sql.SQLBackend.getSQL(SQLBackend.java:245) ~[?:?]
        at ru.tehkode.permissions.backends.sql.SQLBackend.<init>(SQLBackend.java:112) ~[?:?]
        ... 27 more
    This is my permissionsex config:
    Code:
    multiserver:
      use-netevents: true
    permissions:
      debug: false
      allowOps: false
      user-add-groups-last: false
      log-players: false
      createUserRecords: false
      backend: sql
      informplayers:
        changes: false
      basedir: plugins/PermissionsEx
      backends:
        file:
          type: file
          file: permissions.yml
        sql:
          type: sql
          uri: <redacted>
          user: soufikq299_SoufMeneer
          password: <redacted>
    updater: true
    alwaysUpdate: false
    
     
    Last edited by a moderator: Jul 12, 2018
  2. Offline

    timtower Ninja on the waves Moderator

    Moved to Bukkit help.
    Redacted IP and password, you could have been hacked already due to posting those.
    @SoufMeneer Does the mysql server allow remote connections for that user?
     
  3. Offline

    SoufMeneer

    I Dont. I host mysql on a webhost online. And my server on server.pro
     
  4. Offline

    timtower Ninja on the waves Moderator

    Then the chance is big that it doesn't allow remote connections without having the minecraft server whitelisted.
     
  5. Offline

    SoufMeneer

    But what can I do??
     
  6. Offline

    timtower Ninja on the waves Moderator

    You need to login in the webhost control panel and find out where you can whitelist the server IP.
     
  7. Offline

    SoufMeneer


    Now I got this error: 'Acces denied'

    Code:
    Caused by: java.sql.SQLException: Access denied for user
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:873) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1710) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1226) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2188) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2219) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2014) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:776) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_172]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_172]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_172]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_172]
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at ru.tehkode.libs.org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[?:?]
        at ru.tehkode.libs.org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) ~[?:?]
        at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) ~[?:?]
        at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ~[?:?]
        at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) ~[?:?]
        at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[?:?]
        at ru.tehkode.permissions.backends.sql.SQLBackend.getSQL(SQLBackend.java:245) ~[?:?]
        at ru.tehkode.permissions.backends.sql.SQLBackend.<init>(SQLBackend.java:112) ~[?:?]
        ... 27 more
     
    Last edited by a moderator: Jul 13, 2018
  8. Offline

    timtower Ninja on the waves Moderator

  9. Offline

    SoufMeneer

    Thank you thank you very much. You are my hero :) I place my server ip in the whitelist ip of my webhost. And it works!!! Thank you @timtower
     
Thread Status:
Not open for further replies.

Share This Page