Skip to content

ClickHouse driver can't find MySQL or PostgreSQL databases on ClickHouse server version 26.5.2 #76384

Description

@rzuppur

Describe the bug

ClickHouse driver loses all tables from MySQL/PostgreSQL/DataLakeCatalog databases when using latest ClickHouse server (currently 26.5.2.39), caused by ClickHouse/ClickHouse#104416

Driver uses system.tables to find tables. New ClickHouse behaviour is to hide all MySQL and PostgreSQL tables by default. ClickHouse local databases are not affected.

Workaround is to downgrade to previous server release 26.5.1.882 or set show_remote_databases_in_system_tables = 1 inside ClickHouse.

To Reproduce

  1. Install latest ClickHouse server release
  2. Connect MySQL database to ClickHouse
CREATE DATABASE mysql_db ENGINE = MySQL('127.0.0.1:3306', 'mysql_database', 'user', 'pw');
  1. Connect ClickHouse to Metabase
  2. Try to find MySQL database via ClickHouse inside Metabase

Expected behavior

ClickHouse driver should successfully find MySQL and PostgreSQL databases.

Logs

No response

Information about your Metabase installation

{
  "browser-info": redacted,
  "metabase-info": {
    "databases": [
      "clickhouse",
      "mysql"
    ],
    "run-mode": "prod",
    "plan-alias": "",
    "version": {
      "date": "2026-06-21",
      "tag": "v0.62.2.8",
      "hash": "bfd7c7a"
    },
    "settings": {
      "report-timezone": null
    },
    "hosting-env": "unknown",
    "application-database": "mysql",
    "application-database-details": {
      "database": {
        "name": "MySQL",
        "version": "8.0.46-0ubuntu0.22.04.3"
      },
      "jdbc-driver": {
        "name": "MariaDB Connector/J",
        "version": "2.7.10"
      }
    }
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "21.0.11+10-1-22.04.2-Ubuntu",
    "java.vendor": "Ubuntu",
    "java.vendor.url": "https://ubuntu.com/",
    "java.version": "21.0.11",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "21.0.11+10-1-22.04.2-Ubuntu",
    "jvm.available-processors": 2,
    "jvm.max-memory": "2.0 GB",
    "os.name": "Linux",
    "os.version": "5.15.0-181-generic",
    "system.total-memory": "7.8 GB",
    "user.language": "en",
    "user.timezone": "Europe/Tallinn"
  }
}

Severity

blocking some users - for anyone using MySQL/PostgreSQL databases inside ClickHouse they just silently vanish

Additional context

# 26.5.1.882 lists mysql database in system.tables

SELECT
    database,
    name,
    engine
FROM system.tables
WHERE database NOT IN ('system', 'information_schema', 'INFORMATION_SCHEMA')

   ┌─database─┬─name────────┬─engine────┐
1. │ default  │ ch_table    │ MergeTree │
2. │ mysql_db │ mysql_table │ MySQL     │
   └──────────┴─────────────┴───────────┘

# and via show tables
SHOW TABLES FROM mysql_db

   ┌─name────────┐
1. │ mysql_table │
   └─────────────┘
# 26.5.2.39 doesn't list mysql database in system.tables by default
SELECT
    database,
    name,
    engine
FROM system.tables
WHERE database NOT IN ('system', 'information_schema', 'INFORMATION_SCHEMA')

   ┌─database─┬─name─────┬─engine────┐
1. │ default  │ ch_table │ MergeTree │
   └──────────┴──────────┴───────────┘

# only in show tables
SHOW TABLES FROM mysql_db

   ┌─name────────┐
1. │ mysql_table │
   └─────────────┘

# works like before by setting this
SET show_remote_databases_in_system_tables = 1

SELECT
    database,
    name,
    engine
FROM system.tables
WHERE database NOT IN ('system', 'information_schema', 'INFORMATION_SCHEMA')

   ┌─database─┬─name────────┬─engine────┐
1. │ default  │ ch_table    │ MergeTree │
2. │ mysql_db │ mysql_table │ MySQL     │
   └──────────┴─────────────┴───────────

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions