Start_lightning.sh启动报错“schema-create.sql”文件找不到

start_lightning.sh命令日志报找不到schema-create.sql,请问下这个DB建库文件需要放置在哪个位置? 没看到tidb-lightning.toml这个配置文件里面有这个配置。

2019/09/27 19:37:07.158 [info] Welcome to lightning 2019/09/27 19:37:07.158 [info] Release Version: v2.1.5 2019/09/27 19:37:07.158 [info] Git Commit Hash: 10b9033448798c57b1f97cbcba02030673be4495 2019/09/27 19:37:07.158 [info] Git Branch: release-2.1 2019/09/27 19:37:07.158 [info] UTC Build Time: 2019-02-28 08:24:43 2019/09/27 19:37:07.158 [info] Go Version: go version go1.11.2 linux/amd64 2019/09/27 19:37:07.158 [info] cfg {“lightning”:{“level”:“info”,“file”:“log/tidb_lightning.log”,“max-size”:128,“max-days”:28,“max-backups”:14,“table-concurrency”:8,“region-concurrency”:4,“io-concurrency”:5,“pprof-port”:8289,“check-requirements”:true},“tidb”:{“host”:“XXXXXXXX”,“port”:XXXXXX,“user”:“root”,“status-port”:10080,“pd-addr”:“XXXXXXXXXXXX:XXXX”,“sql-mode”:“STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION”,“log-level”:“error”,“distsql-scan-concurrency”:16,“build-stats-concurrency”:20,“index-serial-scan-concurrency”:20,“checksum-table-concurrency”:16},“checkpoint”:{“enable”:true,“schema”:“tidb_lightning_checkpoint”,“driver”:“file”,“keep-after-success”:false},“mydumper”:{“read-block-size”:65536,“batch-size”:107374182400,“batch-import-ratio”:0,“data-source-dir”:"/home/tidb/deploy/mydumper",“no-schema”:false,“character-set”:“auto”},“black-white-list”:null,“tikv-importer”:{“addr”:“XXX:XXXX”},“post-restore”:{“level-1-compact”:true,“compact”:true,“checksum”:true,“analyze”:true},“cron”:{“switch-mode”:“5m0s”,“log-progress”:“5m0s”},“config-file”:"./conf/tidb-lightning.toml"} 2019/09/27 19:37:07.159 [error] failed to load mydumper source : missing file github.com/pingcap/tidb-lightning/lightning/mydump.init /home/jenkins/workspace/build_tidb_lightning_2.1/go/src/github.com/pingcap/tidb-lightning/lightning/mydump/loader.go:31 github.com/pingcap/tidb-lightning/lightning.init :1 main.init :1 runtime.main /usr/local/go/src/runtime/proc.go:189 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1333 missing {schema}-schema-create.sql 2019/09/27 19:37:07.159 main.go:65: [error] tidb lightning encountered error:missing file github.com/pingcap/tidb-lightning/lightning/mydump.init /home/jenkins/workspace/build_tidb_lightning_2.1/go/src/github.com/pingcap/tidb-lightning/lightning/mydump/loader.go:31 github.com/pingcap/tidb-lightning/lightning.init :1 main.init :1 runtime.main /usr/local/go/src/runtime/proc.go:189 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1333 missing {schema}-schema-create.sql

lightning配置文件部分内容 vim tidb-lightning.toml

[mydumper] data-source-dir = “/home/tidb/deploy/mydumper” no-schema = false read-block-size = 65536 region-min-size = 268435456

schema-create.sql 是通过 mydumper 导出时指定 --database 时生成的,如果没有这个文件,也可以手动建一个。

schema-create.sql 这个文件放置在哪个目录下? 是统一放到tidb-lightning.toml 指定的 mydumper data-source-dir 目录下吗?

[mydumper] data-source-dir = “/home/tidb/deploy/mydumper”

刚刚实验了下,确定schema-create.sql文件是放置在这个tidb-lightning.toml指定的data-source-dir目录下

用 mydumper 导出时要指定一个导出目录, tidb-lightning.toml 中的 data-source-dir 配置就是 mydumper 导出的文件目录,会按格式读取这个目录下的 mydumper 导出文件。