Jumper251 / AdvancedReplay

Minecraft plugin to record players on your server
GNU General Public License v3.0
141 stars 62 forks source link

[BUG] "Unable to connect to MySQL database: Public Key Retrieval is not allowed." #166

Closed TheModdersDen closed 2 months ago

TheModdersDen commented 2 months ago

The title pretty much covers the issue. When I try to enable the MySQL storage mode for this plugin, it returns the error in the title. I have tired to fix this (with the following ideas/attempts), but to no avail:

  1. Change the YAML config files values to be strings (add a ' around the values required to connect to the server.
  2. Verifying the URL, port, etc. is all correct.
  3. Turning it off and on again - IT Crowd Reference. 😉
  4. Looking through the closed and open issues for potential solutions and duplicates.
  5. Etc.

Any help/ideas would be greatly appreciated. I would love to not have to go and edit the source of your plugin, recompile it, and try it out on my own if there's a simple fix that I'm just oblivious to.

Thanks in advance, //TheModdersDen

Also, attached to this issue is a link with the latest log from my server. 😄

Log here (GhostBin)

Password is: MC101

TheModdersDen commented 2 months ago

Quick follow-up: A bit about my server:

Hopefully that information might clear up potential follow-up questions. :)

Jumper251 commented 2 months ago

It looks like this can be fixed by adding another property to the MySQL connection. I can add an option for that to the mysql.yml.

TheModdersDen commented 2 months ago

If you could, that would be awesome! 😎

Jumper251 commented 2 months ago

In AdvancedReplay version 1.8.6 you can now change the MySQL connection properties. The default will look something like this:

port: 3306
host: 'yourhost'
database: 'yourdb'
username: 'username'
password: 'password'
prefix: ''
properties:
- useSSL=false
- characterEncoding=latin1

In your case, adding allowPublicKeyRetrieval=true should fix the issue.

TheModdersDen commented 2 months ago

Awesome! I will test it out after my work today! 😃