Canal监控数据库
注意事项
1、反射报错解决
错误:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/C:/Users/ASUS/.m2/repository/com/google/protobuf/protobuf-java/3.6.1/protobuf-java-3.6.1.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
翻译:
警告:发生了非法的反射访问操作
警告:com.google.protobuf进行非法反射访问。UnsafeUtil(文件:/C:/Users/ASUS/.m2/repository/com/google/protobuf/protobuf-java/3.6.1/protobuf-java-3.6-1.jar)到java.nio.Buffer.address字段
警告:请考虑将此报告给com.google.protobuf.UnsafeUtil的维护者
警告:使用--非法访问=警告以启用进一步非法访问操作的警告
警告:所有非法访问操作将在未来版本中被拒绝
解决方法:
jdk版本过高,换用1.8版本即可
2、Windows下解压tar.gz压缩文件
博客连接:http://t.csdn.cn/5Aboj
3、Java客户端连接成功但是没有监听到数据
1.打开canal 解压包下的conf/example/instance.properties文件
# binlog日志名称
canal.instance.master.journal.name=mysql-bin.000001 要写明监控的日志文件,因为canal是依靠监控日志表来实现的
3.MySQL的日志文件可通过my.ini配置
my.ini的文件地址有可能在mysql安装目录下也有可能在某盘的ProgramData\MySQL\MySQL Server 5.7\Data文件下,
5、Spingboot整合Canal完整步骤
博客:http://t.csdn.cn/2VQAP 或者http://t.csdn.cn/fXhDm