Can not run the Metabase docker with mysql

Using docker mode, the docker file is
FROM metabase/metabase:v0.38.0

The database is mysql, tidb

When run the docker it throw the following DatabaseException:
[HY000][3780] Referencing column ‘organization_id’ in foreign key constraint ‘fk_database_ref_organization_id’ are incompatible

What can I do?

Hi @zhoutong
Metabase does not officially support TiDB unless it’s fully compatible with MySQL 5.7+/MariaDB 10.2+ which is supported.
You can set MB_DB_AUTOMIGRATE=false and manually make the changes.
You’re likely seeing this issue

1 Like

I have modified metabase 0.39.1 migrations to work with TiDB, check them out here: