PyvesB / advanced-achievements

:fireworks: Popular plugin that adds unique and challenging achievements to Minecraft servers.
https://www.spigotmc.org/resources/83466
GNU General Public License v3.0
200 stars 211 forks source link

Unable to connect to the intranet database #1076

Closed SheerYin closed 2 years ago

SheerYin commented 2 years ago

πŸŽ† Advanced Achievements version

AdvancedAchievements-7.2.3

πŸ–₯ Server version

purpur-1.17.1-1397

🚰 Spigot username

purpur

𝑾 Wiki read

πŸ“ Existing issues

πŸ› Description

When connecting to the local database (127.0.0.1), no error is reported normally When connecting to the intranet database (192.168.x.x), an error is reported Even a new database

Other plug-ins can be connected to the intranet, such as lcukperms

πŸ“„ Server logs

[17:21:33] [Server thread/ERROR]: [AdvancedAchievements] Database error while removing descriptions: java.sql.SQLSyntaxErrorException: Can't DROP 'description'; check that column/key exists at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[patched_1.17.1.jar:git-Purpur-1397] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[patched_1.17.1.jar:git-Purpur-1397] at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:762) ~[patched_1.17.1.jar:git-Purpur-1397] at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:646) ~[patched_1.17.1.jar:git-Purpur-1397] at com.hm.achievement.db.DatabaseUpdater.removeAchievementDescriptions(DatabaseUpdater.java:187) ~[AdvancedAchievements-7.2.3.jar:?] at com.hm.achievement.db.AbstractDatabaseManager.initialise(AbstractDatabaseManager.java:107) ~[AdvancedAchievements-7.2.3.jar:?] at com.hm.achievement.lifecycle.PluginLoader.loadAdvancedAchievements(PluginLoader.java:132) ~[AdvancedAchievements-7.2.3.jar:?] at com.hm.achievement.AdvancedAchievements.onEnable(AdvancedAchievements.java:49) ~[AdvancedAchievements-7.2.3.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.17.1.jar:git-Purpur-1397] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.17.1.jar:git-Purpur-1397] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.17.1.jar:git-Purpur-1397] at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:535) ~[patched_1.17.1.jar:git-Purpur-1397] at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:449) ~[patched_1.17.1.jar:git-Purpur-1397] at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:727) ~[patched_1.17.1.jar:git-Purpur-1397] at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:318) ~[patched_1.17.1.jar:git-Purpur-1397] at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1216) ~[patched_1.17.1.jar:git-Purpur-1397] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[patched_1.17.1.jar:git-Purpur-1397] at java.lang.Thread.run(Thread.java:831) [?:?]

βš™ Configuration

DatabaseAddress: jdbc:mysql://192.168.x.x:6151/survival_advancedachievements DatabaseUser: root DatabasePassword: '**'

PyvesB commented 2 years ago

Hello @SheerYin ! πŸ‘‹πŸ»

Which version of MySQL are you using? Did you happen to upgrade from an older version of the plugin?

SheerYin commented 2 years ago

Hello @SheerYin ! πŸ‘‹πŸ»

Which version of MySQL are you using? Did you happen to upgrade from an older version of the plugin?

mysql-installer-community-8.0.23.0

No, even if you use a new empty database (without any data), but still connected to the intranet mysql, this error is still reported

If it is 127.0.0.1, there is no such error Even if it is a database with data, it still works normally

Other plug-ins, whether local or intranet database All connected normally

PyvesB commented 2 years ago

So, what is the the difference between the local and the intranet databases? Are they running different MySQL versions? Are they somehow configured differently?

SheerYin commented 2 years ago

So, what is the the difference between the local and the intranet databases? Are they running different MySQL versions? Are they somehow configured differently?

all the same

PyvesB commented 2 years ago

Have you set a different value of TablePrefix in config.yml for the two databases by any chance?

SheerYin commented 2 years ago

Have you set a different value of in config.yml for the two databases by any chance?TablePrefix

In the default setting, there is no TablePrefix And also did not set TablePrefix Are all consistent

PyvesB commented 2 years ago

Does the error still happen when Advanced Achievements is the only plugin installed on the server?

SheerYin commented 2 years ago

Does the error still happen when Advanced Achievements is the only plugin installed on the server?

Sorry, there is a problem with my server, now the server is down Can you give me some time

PyvesB commented 2 years ago

The next version of the plugin will no longer contain the problematic bit of code (see fcc434ec02285743e8a15b0030c70a009efc009e), so I'll go ahead and close this. πŸ˜‰

SheerYin commented 2 years ago

The next version of the plugin will no longer contain the problematic bit of code (see fcc434e), so I'll go ahead and close this. πŸ˜‰

This time I reinstalled the system and did not install the database locally I updated to the latest version and it has been resolved, thank you very much

PyvesB commented 2 years ago

You're welcome, glad to hear it's solved!