Skip to content

[Tracking]: MySQL connector compatibility for Metabase and Power BI #24161

Open

Description

@dengn

Summary

The official release of Metabase (open-source BI tool) cannot connect to MatrixOne out of the box via the MySQL connector. The connection fails due to MySQL protocol compatibility issues.

A working version currently exists as a custom-patched Metabase maintained by @iamlinjunhong, which fixes the compatibility gaps. This patched version is deployed in a customer POC environment and works correctly.

Expected Behavior

Metabase (latest stable) should be able to connect to MatrixOne using the built-in MySQL database driver, execute queries, and render dashboards — the same way it works with MySQL 8.x.

Actual Behavior

Connection fails or queries error out when using the official Metabase release against MatrixOne. Specific errors depend on the Metabase version but are related to MySQL protocol handshake / metadata query incompatibilities.

Impact

  • Metabase is one of the most popular open-source BI tools (40K+ GitHub stars)
  • Many customers evaluate MatrixOne by connecting their existing BI stack
  • Every customer who tries Metabase + MO hits this wall immediately
  • At least one active customer POC currently depends on the custom patch

What Needs to Be Done

  1. Identify the specific MySQL protocol gaps that cause Metabase to fail (likely information_schema queries, SHOW command output format, or session variable handling)
  2. Fix them in MatrixOne's MySQL protocol layer so that unmodified Metabase works
  3. Verify with Metabase latest stable (v0.52+)

Reference


Consolidated tracking — 2026-11-16

This issue coordinates the shared MySQL-connector compatibility investigation for:

The reports are in the same root-cause family, but a single code fix is not assumed. Investigate the common handshake, SQL, metadata, and protocol behavior together; close either issue only after its own client-specific reproduction and acceptance pass.

Both issues remain open and retain @iamlinjunhong as their sole assignee.

Activity

  1. dengn commented on Oct 12, 2026

    @dengn
    ContributorAuthor

    Additional native-client reproduction for this existing Metabase compatibility tracker (2026-10-12).

    Pinned environment

    • Running MatrixOne binary: 23d8f61252f3017dff218b530817a240206fd762, local work build.
    • Runtime: git_version() = 23d8f61252, VERSION() = 8.0.30-MatrixOne-v.
    • Standalone LOG/TN/CN, Linux x86_64; current main and release builds have not been redeployed here.
    • Official Metabase v0.64.1.5 (e2461dc), image sha256:08b1ebc81765c42f936acd4a83db4178e403805f9c473650e974a2b70cf38d37.
    • Its bundled MySQL driver is MariaDB JDBC 2.7.15, verified from META-INF/maven/org.mariadb.jdbc/mariadb-java-client/pom.properties.
    • The public Maven 2.7.15 artifact has identical Driver, AbstractConnectProtocol and Buffer class bytes to the bundled copies. Standalone JAR SHA256: 216310985509ad41bf94e649f520d124b2ad4bb8a40d865ed6606de528bbb0ab.
    • Java 21. No application schema or business data is needed for the connection-only reproduction.

    1. Pipeline authentication: independent reproduction

    The default connection initialization can fail with:

    java.lang.ArrayIndexOutOfBoundsException: Index -4 out of bounds for length 8
      at org.mariadb.jdbc.internal.com.read.Buffer.readShort(Buffer.java:145)
      at org.mariadb.jdbc.internal.com.read.resultset.ColumnDefinition.<init>(ColumnDefinition.java:151)
      at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readResultSet(AbstractQueryProtocol.java:1854)
      at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1572)
      at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1522)
      at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.readPipelineAdditionalData(AbstractConnectProtocol.java:1053)
      at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.postConnectionQueries(AbstractConnectProtocol.java:902)
    

    Two bounded, sequential connection experiments:

    Driver classpath Default pipeline auth, 30 fresh connections usePipelineAuth=false, 30 fresh connections
    The exact Metabase uber-JAR 29 initialization failures, 1 success 30 successes
    Public Maven MariaDB JDBC 2.7.15 JAR 24 initialization failures, 6 successes 30 successes

    Every successful connection executed SELECT 1 and returned 1. This is intermittent, not an assertion that every default connection must fail. The counts are diagnostic observations, not long-duration stability statistics.

    Minimal reproduction:

    import java.sql.*;
    
    class MariaDbPipelineLoop {
     public static void main(String[] args)throws Exception {
      Class.forName("org.mariadb.jdbc.Driver");
      String base="jdbc:mariadb://"+System.getenv().getOrDefault("MO_HOST","127.0.0.1")+":"+System.getenv().getOrDefault("MO_PORT","6001")+"/?useSsl=false&connectTimeout=5000";
      for(String opt:new String[]{"","&usePipelineAuth=false"}) {
       int good=0,bad=0;
       for(int i=0;i<30;i++) {
        try(Connection c=DriverManager.getConnection(base+opt,System.getenv("MO_USER"),System.getenv("MO_PASSWORD"));Statement s=c.createStatement();ResultSet r=s.executeQuery("SELECT 1")) {
         if(!r.next()||r.getInt(1)!=1)throw new SQLException("Wrong positive-control result");good++;
        }catch(Exception e){bad++;System.out.println("FAIL iteration="+i+" options="+opt+" "+e);}
       }
       System.out.println("SUMMARY options="+(opt.isEmpty()?"defaults":opt)+" passed="+good+" failed="+bad);
      }
     }
    }

    Supply MO_HOST, MO_PORT, MO_USER and MO_PASSWORD through the environment. Run with the public Maven artifact org.mariadb.jdbc:mariadb-java-client:2.7.15:

    java --class-path mariadb-java-client-2.7.15.jar MariaDbPipelineLoop.java

    Current application workaround: add usePipelineAuth=false to the Metabase MySQL datasource's additional connection options. This enabled native SQL and saved-card execution in the tested application.

    No packet-level root cause or reference-MySQL control is claimed here. Please triage the driver/server pipeline exchange and retest the intended supported versions.

    2. Table discovery has a separately isolated SQL blocker

    Metabase's sync-tables then fails on SHOW GRANTS FOR CURRENT_USER().
    The standalone SQL reproduction and successful SHOW GRANTS control are now recorded in #29952.

    3. Field-sync exception: observed, attribution still open

    The native Metabase sync-fields log also reports:

    java.lang.Boolean cannot be cast to java.lang.Number
    

    This is an application/driver interaction observation, not yet an established MatrixOne field-type defect. A standalone DatabaseMetaData.getColumns check for the nine-column synthetic orders table completed after pipeline auth was disabled; its DATA_TYPE and COLUMN_SIZE values were numeric.

    The exact failing Metabase metadata statement and field still need isolation. This should not be conflated with #29904's uppercase type names / NULL collation report or presented as fixed merely because native SQL works.

    Attribution boundary

    The accompanying BI sweep also found a Superset tuple-mutation error and Rill/Evidence DECIMAL-to-floating-point precision loss. Those are client-side findings and are not reported here as MatrixOne engine defects.

    The earlier observed one-byte spill cap was subsequently traced to the automatic disk-headroom policy when available disk is at/below its 16 GiB reserve; the same queries passed with the original configuration after freeing space. It is excluded from the confirmed database-defect list.

  2. changed the title [-][Compatibility] Metabase cannot connect to MatrixOne without custom patches[/-] [+][Tracking]: MySQL connector compatibility for Metabase and Power BI[/+] on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions