1.当删除binlog.00000x 日志可能mysql再启动不了,需要把binlog.index清空

2.Mysql重新安装或者安装高版本的时候,canal启动报错
2020-07-06 07:10:39.236 [destination = example , address = bigdata101/192.168.1.96:3306 ,
EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address bigdata101/192.168.1.96:3306 has an error, retrying. caused by
java.io.IOException: Received error packet: errno = 1236,
sqlstate = HY000 errmsg = Could not find first log file name in binary log index file

解决办法:/opt/module/canal/conf/example/ meta.dat 删除
Mysql8 默认开启binlog和format=row
使用Canal需要在mysql my.conf中增添 service-id
3.Canal HA 第二台机器报错

1.提高允许的max_connection_errors数量(治标不治本):
① 进入Mysql数据库查看max_connection_errors:
show variables like '%max_connection_errors%';
② 修改max_connection_errors的数量为1000:
set global max_connect_errors = 1000;
2.第二步可以在数据库中进行,命令如下:
flush hosts;
附加:Canal HA配置
修改canal.properties文件
canal.zkServers=192.168.207.141:2181,192.168.207.142:2181,192.168.207.143:2181
修改instance.properties文件
canal.instance.mysql.slaveId = 1234 #两台不一样
position info
canal.instance.master.address = 192.168.207.141:3306
canal.instance.dbUsername = root
canal.instance.dbPassword = 123456
canal.instance.defaultDatabaseName = canal
canal.instance.connectionCharset = UTF-8
本文概述了如何处理MySQL删除binlog日志导致的问题,包括清理binlog.index、处理Canal安装错误,以及修复Canal HA中关于max_connection_errors的设置,同时介绍了如何配置Canal实例和解决不同场景下的错误。
589

被折叠的 条评论
为什么被折叠?



