SkinsRestorer / SkinsRestorerX

SkinsRestorer development repository

Home Page:https://skinsrestorer.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MYSQL: Client does not support authentication protocol requested by server. plugin type was = 'caching_sha2_password'

artemzheglovds opened this issue · comments

Describe the bug

When using the velocity version of this plugin, when trying to connect the database, an error appears:
[skinsrestorer]: Can't connect to MySQL! Disabling SkinsRestorer.
java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=localhost)(port=3306)(type=master) : Client does not support authentication protocol requested by server. plugin type was='mysql_native_password'

If you do "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'my_pass'; FLUSH PRIVILEGES;" and try again - nothing will change. On the spigot version of the plugin, everything works great.

A clear and concise description of what the bug is.

mysql_native_password setting not working.

How can we reproduce what you got?

Steps to reproduce the behavior:

  1. install SkinsRestorer Velocity.
    2.Install mysql.
  2. Connect SkinsRestorer to mysql database, you can also do "ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'my_pass'; FLUSH PRIVILEGES;".
  3. See error in console.

Expected behavior
A clear and concise description of what you expected to happen.
After migrating my server to Velocity, the database should have connected in your plugin, but this did not happen.

Screenshots
image

Server information

On what platform does your server run? (Bungeecord/Spigot/Bukkit)
Velocity (latest dev build)

What version? Do NOT answer LATEST

  • SkinsRestorer: 14.1.13.
  • Spigot version: 1.18.2.
  • Bungeecord version: Velocity (latest dev build).
  • IF bungee, did you put the plugin on all servers: Yes.
  • Java: 17
  • plugin list bungee & spigot: only skinsrestorer.
  • MinecraftLauncher?: TLauncher
  • if multiverse, (censored) worlds file: -

Logs

https://hastebin.app/623366ff7c6b36001b89b007

Thanks

Thanks

🙃

commented

Sorry for the delay. Please create your user like so: CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'somePassword';

commented

I have had this issue on some setup before. The command above should fix the issue. Make sure to delete the other user first tho.

I can't.
In the latest release I have this error:
image

but
image

should i just wait?

Now i have this error:

[08:37:54 ERROR] [net.skinsrestorer.shadow.mariadb.pool.Pool]: error initializing pool connection
java.sql.SQLException: Client does not support authentication protocol requested by server. plugin type was = 'mysql_native_password'
        at net.skinsrestorer.shadow.mariadb.plugin.authentication.AuthenticationPluginLoader.get(AuthenticationPluginLoader.java:48) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.client.impl.ConnectionHelper.authenticationHandler(ConnectionHelper.java:286) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.client.impl.StandardClient.<init>(StandardClient.java:188) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.Driver.connect(Driver.java:64) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.pool.Pool.addConnection(Pool.java:197) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.pool.Pool.<init>(Pool.java:99) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.pool.Pools.retrievePool(Pools.java:36) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.MariaDbPoolDataSource.<init>(MariaDbPoolDataSource.java:43) ~[?:?]
        at net.skinsrestorer.shared.storage.MySQL.connectPool(MySQL.java:62) ~[?:?]
        at net.skinsrestorer.shared.utils.SharedMethods.initMysql(SharedMethods.java:75) ~[?:?]
        at net.skinsrestorer.velocity.SkinsRestorer.initStorage(SkinsRestorer.java:155) ~[?:?]
        at net.skinsrestorer.velocity.SkinsRestorer.onProxyInitialize(SkinsRestorer.java:129) ~[?:?]
        at net.skinsrestorer.velocity.Lmbda$1.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[velocity.jar:3.1.2-SNAPSHOT (git-44dc2e7c-b131)]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[velocity.jar:3.1.2-SNAPSHOT (git-44dc2e7c-b131)]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[velocity.jar:3.1.2-SNAPSHOT (git-44dc2e7c-b131)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
[08:37:54 INFO] [skinsrestorer]: Connected to MySQL!
[08:37:54 ERROR] [net.skinsrestorer.shadow.mariadb.pool.Pool]: error adding connection to pool
java.sql.SQLException: Client does not support authentication protocol requested by server. plugin type was = 'mysql_native_password'
        at net.skinsrestorer.shadow.mariadb.plugin.authentication.AuthenticationPluginLoader.get(AuthenticationPluginLoader.java:48) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.client.impl.ConnectionHelper.authenticationHandler(ConnectionHelper.java:286) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.client.impl.StandardClient.<init>(StandardClient.java:188) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.Driver.connect(Driver.java:64) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.pool.Pool.addConnection(Pool.java:197) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.pool.Pool.lambda$addConnectionRequest$0(Pool.java:127) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
[08:37:54 INFO] [skinsrestorer]: ----------------------------------------------
[08:37:54 INFO] [skinsrestorer]:     +==================+
[08:37:54 INFO] [skinsrestorer]:     |   SkinsRestorer  |
[08:37:54 INFO] [skinsrestorer]:     |------------------|
[08:37:54 INFO] [skinsrestorer]:     +==================+
[08:37:54 INFO] [skinsrestorer]: ----------------------------------------------
[08:37:54 INFO] [skinsrestorer]:     Current version: 14.2.0-SNAPSHOT
[08:37:54 INFO] [skinsrestorer]:     This is the latest version!
[08:37:54 INFO] [skinsrestorer]: ----------------------------------------------
commented

Have you followed my instructions from above?

Yes.

I also tried to do this:
ALTER USER 'ab'@'localhost' IDENTIFIED WITH mysql_native_password BY 'some_pass';
flush privileges;

Nothing has changed

I did it all over again. Same error. My actions:

mysql> CREATE USER 'ab'@'127.0.0.1' IDENTIFIED BY 'some_pass';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON * . * TO 'ab'@'127.0.0.1';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

SkinsR config:

MySQL:
Enabled: true
Host: 127.0.0.1
Port: 3306
Database: skinsr
Username: ab
Password: some_pass
SkinTable: 'Skins'
PlayerTable: 'Players'
ConnectionOptions: verifyServerCertificate=false&useSSL=false&serverTimezone=UTC

Error:

[09:36:47 ERROR] [net.skinsrestorer.shadow.mariadb.pool.Pool]: error initializing pool connection
java.sql.SQLException: Client does not support authentication protocol requested by server. plugin type was = 'caching_sha2_password'
        at net.skinsrestorer.shadow.mariadb.plugin.authentication.AuthenticationPluginLoader.get(AuthenticationPluginLoader.java:48) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.client.impl.ConnectionHelper.authenticationHandler(ConnectionHelper.java:286) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.client.impl.StandardClient.<init>(StandardClient.java:188) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.Driver.connect(Driver.java:64) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.pool.Pool.addConnection(Pool.java:197) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.pool.Pool.<init>(Pool.java:99) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.pool.Pools.retrievePool(Pools.java:36) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.MariaDbPoolDataSource.<init>(MariaDbPoolDataSource.java:43) ~[?:?]
        at net.skinsrestorer.shared.storage.MySQL.connectPool(MySQL.java:62) ~[?:?]
        at net.skinsrestorer.shared.utils.SharedMethods.initMysql(SharedMethods.java:75) ~[?:?]
        at net.skinsrestorer.velocity.SkinsRestorer.initStorage(SkinsRestorer.java:155) ~[?:?]
        at net.skinsrestorer.velocity.SkinsRestorer.onProxyInitialize(SkinsRestorer.java:129) ~[?:?]
        at net.skinsrestorer.velocity.Lmbda$1.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[velocity.jar:3.1.2-SNAPSHOT (git-44dc2e7c-b131)]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[velocity.jar:3.1.2-SNAPSHOT (git-44dc2e7c-b131)]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[velocity.jar:3.1.2-SNAPSHOT (git-44dc2e7c-b131)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
[09:36:47 INFO] [skinsrestorer]: Connected to MySQL!
[09:36:47 ERROR] [net.skinsrestorer.shadow.mariadb.pool.Pool]: error adding connection to pool
java.sql.SQLException: Client does not support authentication protocol requested by server. plugin type was = 'caching_sha2_password'
        at net.skinsrestorer.shadow.mariadb.plugin.authentication.AuthenticationPluginLoader.get(AuthenticationPluginLoader.java:48) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.client.impl.ConnectionHelper.authenticationHandler(ConnectionHelper.java:286) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.client.impl.StandardClient.<init>(StandardClient.java:188) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.Driver.connect(Driver.java:64) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.pool.Pool.addConnection(Pool.java:197) ~[?:?]
        at net.skinsrestorer.shadow.mariadb.pool.Pool.lambda$addConnectionRequest$0(Pool.java:127) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
commented

What is your mysql version? Of the server.

MYSQL 8.0.28 (windows)

I'm sorry. Any changes?

commented

Not currently. Maybe test out mariadb instead for now. It's basically a drop in mysql replacement and way faster.

Ah okay. Good luck!

ezoic increase your site revenue