No MySQL Connection even with connector
Fuggschen opened this issue ยท 20 comments
Issue Description: The connection with a MySQL database is not possible because dynmap can't find the MySQL connector although it should be in the right place
- Dynmap Version: 3.1-SNAPSHOT-393
- Server Version: forge-1.16.1-32.0.88 / forge-1.16.1-32.0.106
- Pastebin of Configuration.txt: https://pastebin.com/TZhaLwq5
- Server Host (if applicable): Selfhosted
- Pastebin of crashlogs or other relevant logs: Trimmed Severlog: https://pastebin.com/GeXgNG37
- Other Relevant Data/Screenshots: On Windows with MySQL Server 8, MySQL Connector 8.0.21
- Steps to Replicate: Enable mysql in configuration.txt, place mysql-connector-java-8.0.21.jar in mods/, mods/lib/, lib/, dynmap/ or dynmap/lib/ (none of them work), add the .jar to the runtime variables (-cp "C:\minecraft\mysql-connector-java-8.0.21.jar")
I already read #2432 and #2609 but it won't help me because dynmap can't find the JDBC classes
[ ] I have looked at all other issues and this is not a duplicate
[X] I have been able to replicate this
bukkit/spigot/paper: mysql drivers are present but mariadb is missing
forge: all drivers are missing
I found some solutions
1st Solution (Permeant):
Create a dependency manager like in LuckPerms
2nd Solution (Dirty):
Add the Dynmap.jar together with mariadb-java-client-(version).jar or mysql-connector-java-(version).jar
this can be done by opening the jar's with 7zip and dragging everything from the mariadb jar or the mysql jar to the Dynmap.jar
3rd Solution (Dirty):
Create a plugin and/or a mod that loads the driver's globally. (like @TagnumElite did with SQLConnectors)
4th Solution (Permeant):
add the drivers in the build.gradle
It works well with spigot (1.18.1)
I think it's because spigot has mysqlconnector embedded
Please try this, I would appreciate feedback if it works:
Please try this, I would appreciate feedback if it works:
I did a quick test on a test server. It works.
Latest dynmap snapshot (624), nothing added, not tried to add any mysql connectors myself or anything.
Connected to a MariaDB, with dynmap config as type: mysql
(since I wasn't sure if mariadb
is supported yet)
Gonna migrate my main server from filetree
to mysql
not to see if anything weird will happen!
I did notice that the tilespath
still gets created if it doesnt exist. Commenting out the config line prevents that from hapening.
Does not really matter, but there should be a check for if type is 'filetree', make directory, else nothing
Edit:
Using Fabric Loader 0.12.12 (1.18.1)
can confirm that the mysql jdbc also works for mariadb on forge, thanks Kosma for making this mod!
Thanks @kosma ! It works for me too ๐.
But I think this issue isn't fixed until we fix the documentation too.
Like here : https://www.curseforge.com/minecraft/mc-mods/dynmapforge
In installation section.
Thanks @kosma ! It works for me too ๐.
But I think this issue isn't fixed until we fix the documentation too.
Like here : https://www.curseforge.com/minecraft/mc-mods/dynmapforge
In installation section.
Unfortunately I can't edit the curseforge page to add information about the SQL connector however there are many dead links on that page already so missing information about the SQL connector isn't the biggest issue on that page ๐
I have editted this page https://github.com/webbukkit/dynmap/wiki/Configuration.txt#storage-scheme to be more clear with the new storage-schema information
I also have a PR #3585 to update the readme
This is a known issue with 3.x versions of dynmap on forge I'll update this if/when a solution is found
Just tagging in #1674 here because that's where I looked when I first started having this issue, before I knew it was a modern bug.
Well, I created a "mod" that adds the mysql connector during startup here: Source Code with a build here. Do not I have only tested this with 1.16.5 and probably wont work on lower versions just because of the mod.toml. Might fix that later.
Well, I created a "mod" that adds the mysql connector during startup here: Source Code with a build here. Do not I have only tested this with 1.16.5 and probably wont work on lower versions just because of the mod.toml. Might fix that later.
Wound up here trying to get mariadb connector working with same steps listed above. Will this mod work with mariadb as well or is a separate build needed for that connector?
Just added it.
awesome. I don't see any releases besides the initial. Is that something I have to do? I've never built jar files from source before.
Yeah, I overide the initial release because of file name changes and laziness.