Do not know how, today using mysqlbinlog This command to view the database log file, the following error occurred:
/*!40019 SET @ @session. max_insert_delayed_threads=0*/;
/*!50003 SET @[email protected] @COMPLETION_TYPE, completion_type=0*/;
DELIMITER/*!*/;
# at 4
#170415 1:28:13 server ID 23306 end_log_pos 123 start:binlog v 4, Server v 5.7.16-log created 170415 1:28:13
# Warning:this Binlog is either on use or was not closed properly.
Error:error in Log_event::read_log_event (): ' Sanity check failed ', data_len:71, event_type:35
DELIMITER;
# End of log file
ROLLBACK/* Added by Mysqlbinlog */;
/*!50003 SET [email protected]_completion_type*/;
By looking at the data, a netizen said it might be that the Mysqlbinlog version does not match the database service version, and then I do not get an error when I use full path/usr/local/mysql/bin/mysqlbinlog to view the log file.
The Mysqlbinlog command location is then viewed through the which command:
[email protected] logs]# which mysqlbinlog
/usr/bin/mysqlbinlog
The location of the mysqlbinlog is really not my installed script location,/usr/local/mysql/bin/directory is where I specify the location of the script tool, then/usr/bin/mysqlbinlog this is how to come? The initial judgment was generated by accidentally installing the RPM version of MySQL.
Then know the reason, the problem is solved:
Remove all MySQL tools from the/usr/bin/directory and configure the environment variables:
[Email protected] bin]# rm-rf/usr/bin/mysql*
[[email protected] bin] #echo ' export path= $PATH:/usr/local/mysql/bin/' >>/etc/profile
[[email protected] bin] #source/etc/profile
[email protected] logs]# which mysqlbinlog
/usr/local/mysql/bin/mysqlbinlog
This way the system uses the corresponding version of the Mysqlbinlog by default.
This article is from the "10979687" blog, please be sure to keep this source http://10989687.blog.51cto.com/10979687/1920565
Mysqlbinlog View Log Error