MYSQL: mysqlbinlog读取二进制文件报错read_log_event()

一、问题描述
mysql v 5.0.91
[root@localhost bin]# ./mysqlbinlog /tmp/mysql-bin.000015 
/!40019 SET @@session.max_insert_delayed_threads=0/;
/!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0/;
DELIMITER /!/;
#at 4
#180227 10:31:55 server id 1 end_log_pos 98 Start: binlog v 4, server v 5.0.91-log created 180227 10:31:55
ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 69, event_type: 2
Could not read entry at offset 98:Error in log format or read error
DELIMITER ;
#End of log file
ROLLBACK / added by mysqlbinlog /;
/!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE/;

二、解决方法
去掉默认字符集
#vim /etc/my.cnf 
[client]
#default-character-set = utf8
#character-set-server = utf8
#password = your_password
port = 3306
socket = /var/mysql/mysql.sock
……
[mysqld]
datadir=/var/lib/mysql
#default-character-set = utf8
#character-set-server = utf8
……
[mysql]
no-auto-rehash
#default-character-set = utf8



      本文转自独弹古调  51CTO博客,原文链接:http://blog.51cto.com/hunkz/2073537,如需转载请自行联系原作者





上一篇:RocketMQ 简介


下一篇:Spring Boot 使用 JSR303 实现参数验证