Starting from v5.1, TiDB Lightning can automatically recognize the schema and tables in the downstream. If you use TiDB Lightning earlier than v5.1, you need to set no-schema = true
in the [mydumper]
section in tidb-lightning.toml
. This makes TiDB Lightning skip the CREATE TABLE
invocations and fetch the metadata directly from the target database. TiDB Lightning will exit with error if a table is actually missing.