canal同步mysql数据到mysql库时,无法插入数据,mysql5.7.36

2022-04-07 17:19:45.081 [pool-8-thread-1] ERROR c.a.o.canal.adapter.launcher.loader.CanalAdapterWorker - java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WH' at line 1
java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WH' at line 1

应该是MySQL版本不一致,SQL语句报错了。

把sql贴出来看看呢,重点关注'WH'关键字部分

解决了,是canal配置文件中,表映射关系,没有指定主键导致的