Mysql connection issue

When attempting to connect to a mysql server (version 8.0.18) using Dremio, I’m getting this error in the logs:

Caused by: java.util.concurrent.ExecutionException: java.lang.Exception: Unavailable: Client does not support authentication protocol requested by server. Consider upgrading MariaDB client. plugin was = caching_sha2_password

First I tried dropping in a newer (release candidate) version of the MariaDB client jar to see if that helped, and it did, but now I’m getting an error related to not knowing the server’s RSA key:

Caused by: java.lang.Exception: Unavailable: Could not connect to address=(host=**********)(port=3306)(type=master) : RSA public key is not available client side (option serverRsaPublicKeyFile not set) at com.dremio.exec.catalog.ManagedStoragePlugin$1.run(ManagedStoragePlugin.java:263) ~[dremio-sabot-kernel-4.0.2-201910020123580864-a98a0b9.jar:4.0.2-201910020123580864-a98a0b9] at com.dremio.concurrent.RenamingRunnable.run(RenamingRunnable.java:36) ~[dremio-common-4.0.2-201910020123580864-a98a0b9.jar:4.0.2-201910020123580864-a98a0b9] at com.dremio.concurrent.SingletonRunnable.run(SingletonRunnable.java:41) ~[dremio-common-4.0.2-201910020123580864-a98a0b9.jar:4.0.2-201910020123580864-a98a0b9] at com.dremio.concurrent.SafeRunnable.run(SafeRunnable.java:40) ~[dremio-common-4.0.2-201910020123580864-a98a0b9.jar:4.0.2-201910020123580864-a98a0b9] at com.dremio.concurrent.Runnables$1.run(Runnables.java:45) ~[dremio-common-4.0.2-201910020123580864-a98a0b9.jar:4.0.2-201910020123580864-a98a0b9]

It looks like if we can set a JDBC option with the appropriate value, this could work, but I don’t see a way to do that. Also, I noticed that when I tried using the new driver with a generic JDBC tool (DBeaver), I didn’t have to set the RSA property and it still worked by default. I’m not sure what it’s doing differently under the covers yet…

Any chance this has come up internally anywhere?

I just realized that this only happens when attempting to connect as the root user (it’s only a test, so I didn’t care about letting Dremio use it). Everything was fine when we tried a different user, so I guess it’s not particularly important at this point. It’d still be interesting to know if there’s a way to set properties though.

Hello @desidero,

I think this solution might be applicable: MySQL 8 default authentication plugin

Can you give it a try?

1 Like

Looks like we posted at the same time. It’s okay with non-root users, but root is still a problem. I suppose it doesn’t matter much though.

Is it possible to create config files for the JDBC connections that Dremio makes under the covers? I was poking through dremio-oss for a bit, but didn’t see anything obvious.