Error creating tracks with MySQL storage
alexstaeding opened this issue ยท 6 comments
Using LuckPerms-Sponge-4.1.7.jar Edit: Issue persists with latest version: v4.2.6
Hi, I'm currently in the process of migrating my server from YAML storage to MySQL storage and everything seems to be working fine. I created a backup of the YAML data using /lp export initialBackup
and this worked fine.
However, on import, the following error appears in the console:
[16:36:39] [pool-3-thread-41/INFO]: [LP] (Import) ------------> Showing Error #120 <------------
[16:36:39] [pool-3-thread-41/INFO]: [LP] (Import) Whilst executing: Command #120
[16:36:39] [pool-3-thread-41/INFO]: [LP] (Import) Command: createtrack default
[16:36:39] [pool-3-thread-41/INFO]: [LP] (Import) Type: FAILURE
[16:36:39] [pool-3-thread-41/INFO]: [LP] (Import) Output:
[16:36:39] [pool-3-thread-41/INFO]: [LP] (Import) <------------------------------------------>
This causes a bunch of errors later in the import because the track could not be found, and hence the groups can not be appended to them.
I tried running /lp createtrack default
to fix the issue, but the following error comes up:
[16:37:07] [Server thread/INFO] [nucleus]: Server ran the command: /lp createtrack default
[16:37:07] [pool-4-thread-1/INFO] [STDERR]:
[me.lucko.luckperms.common.command.CommandManager:execute:206]:
java.util.concurrent.CompletionException:
me.lucko.luckperms.lib.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in
your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax
to use near 'groups FROM luckperms_tracks WHERE name='default'' at line 1
The full error is here
Could you update to the latest sponge build here please and try the import again https://luckperms.github.io/
Make sure to erase your previous data as the import command simply imports the permissions again on top of the existing data
The issue persists with the latest version, v4.2.6. I would also like to point out that the latest version of luckperms available on sponge is v4.1.7.
I completely deleted the table and luckperms recreated it. I checked the MySQL server version as well; 8.0.11, the latest. The error is still there.
Maybe the MySQL syntax has changed since you wrote the code? I do believe that a syntax error is caused by the code itself and not the table, especially if it was generated by luckperms.
Have you tested the plugin with MySQL 8+ yet? Maybe that's the issue?
Yes, tested and working fine.
The code uses PreparedStataments, it's up to the driver to convert that into queries to send to the server.
I came across this which seems to be the exact issue I had.
As per the suggestion, I installed MariaDB and have managed to get it all working :)
I guess the solution was to not use MySQL but MariaDB instead.
Looks like an invalid schema of some sort
You could try recreating the table, using the schema defined here:
https://github.com/lucko/LuckPerms/blob/20f992110d1d8bff8bdf252bc159e918d9788ef4/common/src/main/resources/me/lucko/luckperms/schema/mysql.sql#L56-L60
or updating your MySQL server instance to the latest version.
Aside from that, I'm not sure what to suggest. I don't think it's being caused by a bug in LP.