Closed leoliuxd closed 7 years ago
Hi, what version of mysql are u using ? and OS ?
select version();
5.6.16-log
my client is Mac OS x10.12.5 , PHP 7.0.14
i just downgrade php toPHP 5.6.30 and
[ErrorException]
unpack(): Type I: not enough input, need 4, have 0
Tested php example/dump_events.php on OSX 10.12.6 mysql installed from homebrew 5.6.37-log no problems there. Did you add https://github.com/krowinski/php-mysql-replication#mysql-server-settings to my.cnf ? Show me you code do u use files from example ?
Maybe i have found what's the problem, it seems that the mysql character_set affects the parse of binlog. The decoder should be the same with mysql character_set. Thanks ^^
what charset u use in binlog ?
I set that to gbk, but the problem still exist. Some column is set BLOB type.
I came across a fetal error:
[ErrorException]
unpack(): Type i: not enough input, need 4, have 2
only in src/MySQLReplication/BinLog/BinLogServerInfo.php there are same function call,
self::$serverInfo['connection_id'] = unpack('I', $data[$i] . $data[++$i] . $data[++$i] . $data[++$i])[1];