Issue: Synchronizing other databases works fine, but when synchronizing the transaction database, some tables report “fail to initial unit Load of subtask.”
The error message indicates that there is an error in the table creation statement. Try executing that table creation statement in the downstream TiDB to see what happens.
Okay, that sounds a bit troublesome. If it doesn’t involve any confidentiality, please send me the table creation statement, and I’ll execute it here. Also, I would like to ask about the version of DM.
DM version 6.0 webUI
Thank you. I just tried this task in the development environment and there was no problem. Then I compared the fields in development and production, and there was no issue. What could be the reason?
I suspect that the table name for this task is too long and exceeds the limit, causing the table creation to fail. If the task name in the test environment is the same, the final generated task table in dm_meta will be the same as the task table in your error report, and if the character set collation in the test and production environments is the same, then my guess is wrong. You can investigate along this line of thought. It might be difficult for you to provide information, so this blind guess is as far as I can go. The length is the same as the length of the table in your error report.
You can manually create this database downstream, and then grant the following permissions: GRANT Select, Insert, Update, Delete, Create, Drop, Alter, Index ON dm_meta.* TO user@‘’; After granting the permissions, it should work.
The execution of the statement failed because TiDB and MySQL are not fully compatible. Some statements may fail on the TiDB side due to incompatibility or configuration issues. When encountering such problems, you can find the actual statement executed by MySQL based on the binary location and check what error is reported downstream. If possible, modify the statement; if not, you can use a workaround or other methods.