Metabase 0.39.3 Client does not support authentication protocol requested by server

After updating to Metabase 0.39.3 at the start of this month we are struggling to connect to one of our application DB's using MySQL 8, which we move our application to from MySQL 5.6 about a month ago. The problem did not present itself before this update. The error we are seeing is:

Could not connect to address=(host=******)(port=)(type=master) : Client does not support authentication protocol requested by server. plugin type was = 'mysql_native_password'.

We have tried the following to try and resolve the issue, with non of them working:

  • Set up a new username
  • We have specified auth type of both caching_sha2_password and Standard
  • We have flushed host
  • We have tried ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password' and derivative fixes.


    [76c16446-a328-4335-a366-48773da97837] 2021-06-15T16:20:47+01:00 ERROR 
    metabase.driver.util Database connection error
    java.sql.SQLNonTransientConnectionException: Could not connect to address=. 
    (host=***.***.**.**)(port=****)(type=master) : Client does not support authentication 
    protocol requested by server. plugin type was = 'mysql_native_password'
    at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(
    at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(
    at org.mariadb.jdbc.MariaDbConnection.newConnection(
    at org.mariadb.jdbc.Driver.connect(
    at java.sql/java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql/java.sql.DriverManager.getConnection(Unknown Source)
    at metabase.driver.sql_jdbc.connection$can_connect_with_spec_QMARK_.invokeStatic(connection.clj:199)
    at metabase.driver.sql_jdbc.connection$can_connect_with_spec_QMARK_.invoke(connection.clj:196)
    at metabase.driver.sql_jdbc.connection$can_connect_QMARK_.invokeStatic(connection.clj:207)
    at metabase.driver.sql_jdbc.connection$can_connect_QMARK_.invoke(connection.clj:203)
    at metabase.driver.sql_jdbc$fn__81176.invokeStatic(sql_jdbc.clj:35)
    at metabase.driver.sql_jdbc$fn__81176.invoke(sql_jdbc.clj:33)
    at metabase.driver.mysql$fn__80284.invokeStatic(mysql.clj:72)
    at metabase.driver.mysql$fn__80284.invoke(mysql.clj:68)
    at clojure.lang.MultiFn.invoke(
    at metabase.driver.util$can_connect_with_details_QMARK_$fn__29712.invoke(util.clj:34)
    at metabase.util$do_with_timeout$fn__15624.invoke(util.clj:346)
    at clojure.core$binding_conveyor_fn$fn__5754.invoke(core.clj:2030)
    at java.base/ Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)
    at java.base/ Source)
Caused by: java.sql.SQLException: Client does not support authentication protocol requested by server. plugin type was = 'mysql_native_password'
    at org.mariadb.jdbc.authentication.AuthenticationPluginLoader.get(
    at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.authenticationHandler(
    at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(
    at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(
    ... 32 more

None of these have worked and we continue to have

Hi @DanJClarke
You write host=***.***.**.**, but say you have altered 'root'@'localhost'
Remember that MySQL is strange, when it comes to users, so you are altering the credentials for localhost - you would need to alter for whatever login you use.

1 Like

Sorry, to be clear we didn't alter the root user but used the technique of IDENTIFIED WITH mysql_native_password BY 'password' on another user.

@DanJClarke I know, but you are not connecting to localhost for the application database - right?
Login on your MySQL as root and run this to show which credentials are available:
SELECT * FROM mysql.user;
I'm fairly sure that you have a credential called 'root'@'%' or 'root'@'***.***.**.**' (whatever the asterisks are covering over).

Flamber, I think I'm doing a poor job of explaining what we have done. I didn't run that command myself, so unfortunately I'm not able to give you the exact command. Trust me when I say, the person who ran it knew what they were doing and wouldn't have used localhost but the correct credentials. All we know is that this did not work.

@DanJClarke Okay, then you should probably ask that person to jump on this forum and provide more details.

But if you connect to MySQL and it's not on localhost compared to Metabase, then the alter user command is not correct.