Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问: 执行sample/client.php文件, 可以打印出sql语句,后面的具体字段和值都为空. 可能是什么原因呢? #9

Open
q1006882982 opened this issue Mar 29, 2020 · 2 comments

Comments

@q1006882982
Copy link

No description provided.

@loving-irene
Copy link

也碰到了类似的情况

server 搭好了,客户端代码使用的是 sample

最后在 mysql 中 insert 或者 update,客户端打印出来的如下
================> binlog[mysql-bin.000013 : 4720],name[canal,user], eventType: 2 update user setage=302 where name='title'

查看了 example 和 canal 下的日志

example 下只有
2020-10-09 11:33:23.768 [MultiStageCoprocessor-other-example-0] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : create table if not exists user( name char(24), age int(8) ) 2020-10-09 11:34:13.304 [New I/O server worker #1-1] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to .*\..* 2020-10-09 11:34:13.304 [New I/O server worker #1-1] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^.*\..*$ 2020-10-09 15:01:48.521 [New I/O server worker #1-2] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to .*\..* 2020-10-09 15:01:48.535 [New I/O server worker #1-2] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^.*\..*$ 2020-10-09 15:21:43.401 [New I/O server worker #1-1] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to .*\..* 2020-10-09 15:21:43.402 [New I/O server worker #1-1] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^.*\..*$ 2020-10-09 15:22:37.589 [New I/O server worker #1-2] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to .*\..* 2020-10-09 15:22:37.589 [New I/O server worker #1-2] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^.*\..*$ 2020-10-09 15:23:20.347 [New I/O server worker #1-1] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to .*\..* 2020-10-09 15:23:20.347 [New I/O server worker #1-1] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^.*\..*$ 2020-10-09 16:14:09.370 [New I/O server worker #1-2] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to .*\..* 2020-10-09 16:14:09.375 [New I/O server worker #1-2] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^.*\..*$ 2020-10-09 16:21:56.942 [New I/O server worker #1-1] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to .*\..* 2020-10-09 16:21:56.942 [New I/O server worker #1-1] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^.*\..*$

canal.log下没有报错信息

@loving-irene
Copy link

已经解决了,MySQL 配置 binlog-format 的问题,配置了 /etc/my.cnf 之后重启并没有生效,在 mysql 客户端中才检查出来。

配置之后就能够拿到,需要注意的是 mysql 的配置有 global 和 session 两个级别。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants