PermissionsEx

PermissionsEx

14M Downloads

Plugin gets deactivated when enabling sql

Gerolmed opened this issue ยท 3 comments

commented

I want to connect pex with mysql. I changed the backend to "sql" and added the sql part to backends(i looked at the wiki as well as someone tutorials). Than I restarted the Server and when /pex import file there was no reaction (this also did not work in the console). /plugins marked permissionsex red (the mysql database works with other plugins)

commented

Here is the console msg:
[17:43:52 INFO]: [PermissionsEx] Enabling PermissionsEx v1.23.4
[17:43:52 INFO]: [PermissionsEx] Initializing sql backend

========== 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.(SQLBackend.java:118) ~[PermissionsEx-1.23.4.jar:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_101]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_101]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_101]
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_101]
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.(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:292) [spigot.jar:git-Spigot-5a40365-b70058a]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot.jar:git-Spigot-5a40365-b70058a]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-5a40365-b70058a]
at org.bukkit.craftbukkit.v1_9_R1.CraftServer.loadPlugin(CraftServer.java:361) [spigot.jar:git-Spigot-5a40365-b70058a]
at org.bukkit.craftbukkit.v1_9_R1.CraftServer.enablePlugins(CraftServer.java:321) [spigot.jar:git-Spigot-5a40365-b70058a]
at net.minecraft.server.v1_9_R1.MinecraftServer.t(MinecraftServer.java:411) [spigot.jar:git-Spigot-5a40365-b70058a]
at net.minecraft.server.v1_9_R1.MinecraftServer.l(MinecraftServer.java:376) [spigot.jar:git-Spigot-5a40365-b70058a]
at net.minecraft.server.v1_9_R1.MinecraftServer.a(MinecraftServer.java:331) [spigot.jar:git-Spigot-5a40365-b70058a]
at net.minecraft.server.v1_9_R1.DedicatedServer.init(DedicatedServer.java:269) [spigot.jar:git-Spigot-5a40365-b70058a]
at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:527) [spigot.jar:git-Spigot-5a40365-b70058a]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_101]
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'myperms'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_101]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_101]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_101]
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_101]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.Util.getInstance(Util.java:387) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1686) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1207) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2254) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2285) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2084) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:795) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_101]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_101]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_101]
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_101]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400) ~[spigot.jar:git-Spigot-5a40365-b70058a]
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327) ~[spigot.jar:git-Spigot-5a40365-b70058a]
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.(SQLBackend.java:112) ~[PermissionsEx-1.23.4.jar:?]
... 22 more
[17:43:53 INFO]: [PermissionsEx] Disabling PermissionsEx v1.23.4

commented

And the config:
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: mysql://localhost/myperms
user: pluginsentry
password: Thegerolmed
updater: true
alwaysUpdate: false

commented

You need to create the database myperms.