mysql permissionEx help

Discussion in 'BungeeCord Help' started by Hysan, May 10, 2017.

  1. I did open port in Mysql by chaning to 0.0.0.0 And also I edit the firewall settings, but I really don't know how to configure it.
    [16:50:27 INFO]: [PermissionsEx] Initializing sql backend
    [16:50:29 WARN]: [PermissionsEx] Backend initialization failed when HysanGaming was initializing sql
    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_131]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_131]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_131]
    at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_131]
    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.bukkit.commands.UtilityCommands.setBackend(UtilityCommands.java:133) [PermissionsEx-1.23.4.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
    at ru.tehkode.permissions.commands.CommandsManager$CommandBinding.call(CommandsManager.java:248) [PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.permissions.commands.CommandsManager.execute(CommandsManager.java:110) [PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.permissions.bukkit.PermissionsEx.onCommand(PermissionsEx.java:315) [PermissionsEx-1.23.4.jar:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_131]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_131]
    at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot.jar:git-Spigot-21fe707-e1ebe52]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
    Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_131]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_131]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_131]
    at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_131]
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_131]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_131]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_131]
    at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_131]
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at ru.tehkode.libs.org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.libs.org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.permissions.backends.sql.SQLBackend.getSQL(SQLBackend.java:245) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.permissions.backends.sql.SQLBackend.<init>(SQLBackend.java:112) ~[PermissionsEx-1.23.4.jar:?]
    ... 32 more
    Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[?:1.8.0_131]
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) ~[?:1.8.0_131]
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[?:1.8.0_131]
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[?:1.8.0_131]
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[?:1.8.0_131]
    at java.net.PlainSocketImpl.connect(Unknown Source) ~[?:1.8.0_131]
    at java.net.SocksSocketImpl.connect(Unknown Source) ~[?:1.8.0_131]
    at java.net.Socket.connect(Unknown Source) ~[?:1.8.0_131]
    at java.net.Socket.connect(Unknown Source) ~[?:1.8.0_131]
    at java.net.Socket.<init>(Unknown Source) ~[?:1.8.0_131]
    at java.net.Socket.<init>(Unknown Source) ~[?:1.8.0_131]
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_131]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_131]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_131]
    at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_131]
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305) ~[spigot.jar:git-Spigot-21fe707-e1ebe52]
    at ru.tehkode.libs.org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.libs.org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.libs.org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.permissions.backends.sql.SQLBackend.getSQL(SQLBackend.java:245) ~[PermissionsEx-1.23.4.jar:?]
    at ru.tehkode.permissions.backends.sql.SQLBackend.<init>(SQLBackend.java:112) ~[PermissionsEx-1.23.4.jar:?]
    ... 32 more

    multiserver:
    use-netevents: true
    permissions:
    debug: false
    allowOps: false
    user-add-groups-last: false
    log-players: false
    createUserRecords: false
    backend: file
    informplayers:
    changes: false
    basedir: plugins/PermissionsEx
    backends:
    file:
    type: file
    file: permissions.yml
    sql:
    type: sql
    uri: mysql://myserverip:3306/pex
    user: -----
    password: ----
    updater: true
    alwaysUpdate: true

    The user and pass are correct.
    I did /pex reload , and then /pex backend sql
    And the errors appeared. I know it is my problem, please tell me how to set it up correctly
     
    #1 Hysan, May 10, 2017
    Last edited: May 10, 2017
  2. I'd remove your ip from the config when you post here especially if you havnt setup proper firewalls and stuff, have you restarted your sql server since you changed the port config?
     
  3. Thanks, edited. And yes I did
     
  4. are you able to login to mysql from the machine you are using or is it just pex that is having connection issues?
     
  5. actually i think im retarded, drop the port in your address and then try starting your server, so its just uri: mysql://ipaddress/pex
     
  6. You can use this tool to check if the port is open for public access (if that's what you're looking for).
     
  7. Thanks I am exactly looking for this. I love you so much. Thanks!!!
     
  8. I checked. The port is opened. However I can't connect it in pex
     
  9. Can you share the exact error? Filter out any sensitive information from it if needed.
     
  10. A moment, I am trying to put that in the same host