LuckPerms

LuckPerms

41.4k Downloads

Changing from H2 to MySQL database causes issues with luckperms

scottmaxyoda1 opened this issue ยท 3 comments

commented

Recently decide to switch to MySQL due to i think it would be better than mysql. So i setup and enter everything in correctly and check and all of the info is the same i use for my currency plugin which works. However once i switch to MySQL i keep getting this issue in console --- >

[01:08:01 ERROR] [LuckPerms]: Exception occurred whilst loading data for 3be4767d-a9a9-47f1-b104-327f68467865 - LonlyGamerX
java.util.concurrent.CompletionException: java.sql.SQLSyntaxErrorException: Table 'luckpermsdata.luckperms_players' doesn't exist
        at me.lucko.luckperms.common.storage.Storage.lambda$future$0(Storage.java:92) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
        at net.md_5.bungee.scheduler.BungeeTask.run(BungeeTask.java:66) ~[travertine-163.jar:git:Travertine-Bootstrap:1.16-R0.4-SNAPSHOT:fe5acbf:163]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.sql.SQLSyntaxErrorException: Table 'luckpermsdata.luckperms_players' doesn't exist
        at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[?:?]
        at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[?:?]
        at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[?:?]
        at me.lucko.luckperms.lib.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[?:?]
        at me.lucko.luckperms.lib.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003) ~[?:?]
        at me.lucko.luckperms.lib.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52) ~[?:?]
        at me.lucko.luckperms.lib.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java) ~[?:?]
        at me.lucko.luckperms.common.storage.implementation.sql.SqlStorage.getPlayerName(SqlStorage.java:688) ~[?:?]
        at me.lucko.luckperms.common.storage.implementation.sql.SqlStorage.savePlayerData(SqlStorage.java:605) ~[?:?]
        at me.lucko.luckperms.common.storage.Storage.lambda$savePlayerData$20(Storage.java:258) ~[?:?]
        at me.lucko.luckperms.common.storage.Storage.lambda$future$0(Storage.java:87) ~[?:?]
        ... 5 more
[01:08:01 ERROR]: Task BungeeTask(sched=net.md_5.bungee.scheduler.BungeeScheduler@b8a7e43, id=30, owner=me.lucko.luckperms.bungee.LPBungeeBootstrap@2b4786dd, task=me.lucko.luckperms.bungee.listeners.BungeeConnectionListener$$Lambda$1196/0x0000000800897040@78c51552, delay=0, period=0, running=true) encountered an exception
java.lang.NullPointerException: null
        at me.lucko.luckperms.common.event.EventDispatcher.dispatchPlayerLoginProcess(EventDispatcher.java:301) ~[?:?]
        at me.lucko.luckperms.bungee.listeners.BungeeConnectionListener.lambda$onPlayerLogin$0(BungeeConnectionListener.java:105) ~[?:?]
        at net.md_5.bungee.scheduler.BungeeTask.run(BungeeTask.java:66) ~[travertine-163.jar:git:Travertine-Bootstrap:1.16-R0.4-SNAPSHOT:fe5acbf:163]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]

I try creating a group using lpb creategroup (im running on a bungeecord but i even tryed none bungeecord and got the same issues) test and just get this error as well --- >

[01:12:27 ERROR]: java.util.concurrent.CompletionException: java.sql.SQLSyntaxErrorException: Table 'luckpermsdata.luckperms_groups' doesn't exist
[01:12:27 ERROR]:       at me.lucko.luckperms.common.storage.Storage.lambda$future$0(Storage.java:92)
[01:12:27 ERROR]:       at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
[01:12:27 ERROR]:       at net.md_5.bungee.scheduler.BungeeTask.run(BungeeTask.java:66)
[01:12:27 ERROR]:       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[01:12:27 ERROR]:       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[01:12:27 ERROR]:       at java.base/java.lang.Thread.run(Thread.java:834)
[01:12:27 ERROR]: Caused by: java.sql.SQLSyntaxErrorException: Table 'luckpermsdata.luckperms_groups' doesn't exist
[01:12:27 ERROR]:       at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
[01:12:27 ERROR]:       at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
[01:12:27 ERROR]:       at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
[01:12:27 ERROR]:       at me.lucko.luckperms.lib.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
[01:12:27 ERROR]:       at me.lucko.luckperms.lib.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003)
[01:12:27 ERROR]:       at me.lucko.luckperms.lib.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
[01:12:27 ERROR]:       at me.lucko.luckperms.lib.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
[01:12:27 ERROR]:       at me.lucko.luckperms.common.storage.implementation.sql.SqlStorage.selectGroups(SqlStorage.java:894)
[01:12:27 ERROR]:       at me.lucko.luckperms.common.storage.implementation.sql.SqlStorage.loadGroup(SqlStorage.java:443)
[01:12:27 ERROR]:       at me.lucko.luckperms.common.storage.Storage.lambda$loadGroup$9(Storage.java:184)
[01:12:27 ERROR]:       at me.lucko.luckperms.common.storage.Storage.lambda$future$0(Storage.java:87)
[01:12:27 ERROR]:       ... 5 more

I have tried to see if the sql has connect by running commands like /lp info and this below shows up so i guess it is connect just dont know what the issue with it is then --- >

[01:13:39 INFO]: [LP] Running LuckPerms v5.2.60 by Luck.
[01:13:39 INFO]: [LP] -  Platform: BungeeCord
[01:13:39 INFO]: [LP] -  Server Brand: Travertine
[01:13:39 INFO]: [LP] -  Server Version:
[01:13:39 INFO]: [LP]      git:Travertine-Bootstrap:1.16-R0.4-SNAPSHOT:fe5acbf:163
[01:13:39 INFO]: [LP] -  Storage:
[01:13:39 INFO]: [LP]      Type: MySQL
[01:13:39 INFO]: [LP]      Ping: 0ms
[01:13:39 INFO]: [LP]      Connected: true
[01:13:39 INFO]: [LP] -  Extensions:
[01:13:39 INFO]: [LP]      None
[01:13:39 INFO]: [LP] -  Messaging: Sql
[01:13:39 INFO]: [LP] -  Instance:
[01:13:39 INFO]: [LP]      Static contexts: None
[01:13:39 INFO]: [LP]      Online Players: 0 (0 unique)
[01:13:39 INFO]: [LP]      Uptime: 8m 6s
[01:13:39 INFO]: [LP]      Local Data: 0 users, 0 groups, 0 tracks

Is this a bug or something i did wrong? I have check here > https://github.com/lucko/LuckPerms/wiki/Storage-system-errors to see if my error was similar but none were.

commented

Assuming you still have your old data in an export, try deleting all luckperms tables.
Also make sure the user you configured in the LP config has permissions to create tables.

commented

Assuming you still have your old data in an export, try deleting all luckperms tables.
Also make sure the user you configured in the LP config has permissions to create tables.

i have tried deleting all the luckperms tables even restart both the plugin and my MySQL but i get the same error and as far as user permission i have everything clicked on. So it has every permission i can give it

commented

Try stopping the server, then fully deleting all LP tables, then starting the server again.

Make sure there are no errors when LP enables for the first time - that's when the tables get created.