Mysqlbinlog View Log Error

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.