Closed Xaymar closed 4 years ago
Could you try regenerating your configuration files and inputting the SQL information again? This way we can cross out the config files as being the issue. Be sure to make a backup of your current files.
When you say Total Economy is the only thing having issues with MySql, I assume this means you've tried connecting to this same exact database from elsewhere right?
Could you try regenerating your configuration files and inputting the SQL information again? This way we can cross out the config files as being the issue. Be sure to make a backup of your current files.
Done:
currency {
dollar {
currency-plural=Dollars
currency-singular=Dollar
default=true
prefix-symbol=true
startbalance="100"
symbol="$"
transferable=true
}
}
database {
enable=true
password="UnexpectedPasswordException"
url="mysql://localhost:3306/srv-minecraft-1"
user="srv-minecraft-1"
}
features {
jobs {
enable=false
notifications=true
salary=true
}
moneycap {
amount=10000000
enable=false
}
shops {
min-item-price=0
max-item-price=1000000000
chestshop {
enable=true
price=1000
}
}
}
language=en
save-interval=30
If we ignore the password in which I'm basically putting random values in now as it doesn't even use it, they look the same.
When you say Total Economy is the only thing having issues with MySql, I assume this means you've tried connecting to this same exact database from elsewhere right?
Yes, I've ported my old CraftBukki plugin Inception to Forge 1.12.2, and it uses the MySQL JDBC driver to deal with the storage of intermediate transport worlds (a new feature that wasn't possible with CraftBukkit).
Off Topic: Are there any downsides to switching to MariaDB? I'm only using MySQL due to it being much nicer to the NVMe SSDs than PostGreSQL and SQLite/H2.
There shouldn't be any downsides to using MariaDB. I'm not sure why MySQL isn't working for you as I personally use it, and sometimes MariaDB, to test this plugin.
I'll have to look into this some more as this should not be happening.
FYI: TotalEconomy does not decide which database driver to use. The URL indicates the SqlService
of Sponge what driver should be used.
As you can see here, we pass it on to the service and heres how the URL is constructed.
I personally don't see any reason why the wrong driver would be used to connect
Well I tried with MariaDB now and was met with success. Moving all data from MySQL to MariaDB went smoothly, and I even got a ~60% faster database out of it. It seems that the problem is caused by Sponge using the mariadb driver for a mysql connection, as the mariadb driver does not support MySQL 8.0 and higher.
I have the same issue, is the only known solution migrating to MariaDB? I have 3 other plugins that use my database so i would rather not migrate them :)
This shouldn't be the only solution. I'm not sure why this is happening. We'll have to do some more testing on our end. For now, try redownloading the latest release: https://ore.spongepowered.org/Erigitic/Total-Economy/versions/1.8.1.
I'll do that once i am home and report back with the log so you can see any errors
Are you getting the same error @hellbringer616? I just tested this on my end, using MySQL 8, and I'm getting a different error. It's also using the mariadb jdbc driver. After looking around, I'm pretty sure it's normal for MySQL to use this driver.
After downgrading to MySQL 5, I was able to connect to the database and server fine.
I'll need to double check once I am home (it'll be some hours. As I'm at work)
I can tell you I am using SQL8 installed with WAMP
Out of coincidence, I may have found the reason why Sponge avoids using the MySQL driver and uses MariaDBs instead.
HikaryCP - the connection pooling library Sponge uses - mentions issues with the MySQL driver in their readMe and even strikes out the jdbc driver for MySQL.
HikaryCP - the connection pooling library Sponge uses - mentions issues with the MySQL driver in their readMe and even strikes out the jdbc driver for MySQL.
That would explain why it attempts to use MariaDB, which wasn't installed on my system. I've also been able to confirm that downgrading to MySQL 5 does work, but some of the connectivity options make it break (which is likely why it didn't work initially for me).
Versions:
java version "1.8.0_201"
Description of issue
I am unable to use the database option with a MySQL database, even though
libmysql-java
(MySQL JDBC Driver) is installed. For whatever reason it instead tries to connect with MariaDB, a JDBC Driver that isn't actually installed, and also forgets that there is a password set in the configuration.Kinda at my wits end for this one. Nothing else is having trouble with MySQL except Total Economy.
Console errors
Steps to reproduce
Related Configuration Files