Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tidb如何通过dumpling备份导入到mysql8.0,myloader不支持8.0
[TiDB Usage Environment] Production Environment
[TiDB Version]
4013
[Reproduction Path] Operations performed that led to the issue
Backup TiDB using dumpling, then import using myloader
[Encountered Issue: Problem Symptoms and Impact]
- (myloader:6137): CRITICAL **: 16:16:55.011: Error connection to database: SSL connection error: error:00000001:lib(0):func(0):reason(1)
mylosder does not have the skip-ssl parameter.
Can I temporarily disable MySQL’s SSL?
Is it possible to move all the backup files to the MySQL server, and then write a script to import them using the source method? Alternatively, if Navicat can be used, data transfer with Navicat is also quite convenient.
Try another tool, lightning.
Are you using an SQL file or a CSV file?
Can Lingting be imported into MySQL?
There are too many main files, thousands of them.
Version 4.0.13?
You can use version 7.5.0, which is already compatible with MySQL 8.0.
The loader import error occurs when importing data exported by dumpling. How do I import it into version 8.0?
You can test it with a small table. We have used Lightning to import from TiDB to MySQL 5.7.
You can try 8.0 yourself. If it works, the efficiency is very high.
Just write a script to handle it, source.
Unable to import, [ERROR] [main.go:90] [“tidb lightning encountered error stack info”] [error=“Error 1193: Unknown system variable ‘tidb_opt_write_row_id’”] [errorVerbose=“Error 1193: Unknown system variable ‘tidb_opt_write_row_id’\ngithub.com/pingcap/errors.AddStack\n\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/errors.go:174\ngithub.com/pingcap/errors.Trace\n\tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/juju_adaptor.go:15\ngithub.com/pingcap/br/pkg/lightning/common.(*MySQLConnectParam).Connect\n\tgithub.com/pingcap/br@/pkg/lightning/common/util.go:81\ngithub.com/pingcap/br/pkg/lightning/restore.DBFromConfig\n\tgithub.com/pingcap/br@/pkg/lightning/restore/tidb.go:108\ngithub.com/pingcap/br/pkg/lightning.(*Lightning).run\n\tgithub.com/pingcap/br@/pkg/lightning/lightning.go:265\ngithub.com/pingcap/br/pkg/lightning.(*Lightning).RunOnce\n\tgithub.com/pingcap/br@/pkg/lightning/lightning.go:191\nmain.main.func2\n\tgithub.com/pingcap/br@/cmd/tidb-lightning/main.go:86\nmain.main\n\tgithub.com/pingcap/br@/cmd/tidb-lightning/main.go:87\nruntime.main\n\truntime/proc.go:203\nruntime.goexit\n\truntime/asm_amd64.s:1357”]
[2024/02/22 10:40:26.290 +00:00] [ERROR] [main.go:91] [“tidb lightning encountered error”] [error=“Error 1193: Unknown system variable ‘tidb_opt_write_row_id’”]
It can only be like this, there’s no other way.
Change it to a CSV file, or try using DataX.