Prism

Prism

91.2k Downloads

[BUG] MySQL 8 does not work with Prism

hilltty opened this issue ยท 4 comments

commented

Describe the bug
Plugin doesn't work with new MySQL version

To Reproduce

  • Download and install MySQL 8
  • Enter user and database data into the plugin config
  • Reboot server
  • And we understand that nothing works

Expected behavior
Everything should work

Server (please complete the following information):

  • Prism Version: 2.1.7
  • Server Type: Purpur (Paper fork)
  • Server Version: 1.16.5

Additional context
To make sure, I checked on Spigot and Paper, the problem is still present.

commented

MySQL 8 works perfectly fine when configured properly.

If you are getting "Public Key Retrieval is not allowed" here are several solutions, most secure to least secure.

  1. Enable SSL (add useSSL=true to the jdbcUrl) and configure it correctly.
  2. Store the server's public key somewhere prism can access it and add serverRsaPublicKeyFile=<path to the key file> to the jdbcUrl.
  3. Change the db user to use mysql_native_password instead of the default caching_sha2_password (which became the default in 8).
  4. Add useSSL=false&allowPublicKeyRetrieval=true to the jdbcUrl.

All of the jcbcUrl changes can be made in the hikari.properties file

commented

This is not a bug iits a config issue.

commented

Does the error happen to feature a line similar to:
[08:12:30 ERROR]: [Prism] Hikari Pool did not Initialize: Failed to initialize pool: Public Key Retrieval is not allowed
If so then you have the same issue as me

commented

Namely, the solution to this problem is to install MySQL 5