Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: dumpling使用压缩参数导出的sql.gz文件lightning无法导入?
Using dumpling to export MySQL data, planning to import it into TiDB. Since the table is relatively large, I used the compression method [–compress gzip].
– The export statement is roughly as follows, and the exported SQL file has a .gz compressed suffix
cd /apps/svr/tidb-community-toolkit-v6.1.0-linux-amd64
./dumpling -u myuser -p’mypass’ -P 3306 -h 172.16.0.11 -T test.mytab
–filetype sql -t 4 -r 200000 -F256MiB --compress gzip --no-schemas
-o /tmp/test
– Using lightning to import, but it actually failed to import successfully.
nohup /apps/svr/tidb-community-toolkit-v6.1.0-linux-amd64/tidb-lightning -no-schema -config /apps/tidb-lightning_test.toml > nohup_tidb-lightning_test.out &
The solution is to decompress all the sql.gz files exported by dumpling using gunzip, and then initiate the above lightning again.
How can lightning support direct import using sql.gz compressed files?