Mysqlbinlog convert MySQL binaries to text files

Source: Internet
Author: User
Tags base64 deprecated

Some projects are currently migrated to Mysql5.5, and in mysql5.5 Binlog_format is mixed, the default MySQL binary log is base64 format, unreadable, in order to troubleshoot problems, Provide help reading under Mysqlbinlog's help document learned that it can be decoded:

 –base64-output[=name]
Determine when the output statements should is
base64-encoded binlog: ' Never ' disables it and
works a for binlogs without row-based events;
  ' decode-rows ' decodes row events int o commented SQL
                       statements If The–verbose option is also given; ' Auto '
prints base64 only if necessary (i.e., for row-based
Events and Format description events); ' Always ' prints
base64 whenever possible. ' Always ' is deprecated, would be
removed in a future version, and should not to used in a
production system.  –base64-output with no ' name '
argument be equivalent to–base64-output=always and is
also deprecated.  If no –base64-output[=name] option is
given in all, and the default is ' auto '.
Mysqlbinlog–base64-output=decode-rows-v Mys ql-bin.00002

The binary log in row mode can be decoded with the given –base64-output and-v parameters.

Unknown variable ' default-character-set=utf8mb4′ error

A mobile phone network project, using the code for UTF8MB4, everything is normal.

When the Mysqlbinlog is used, the prompts are as follows:

[Root@localhost data]# Mysqlbinlog mysql-bin-500.000011
Mysqlbinlog:unknown variable ' default-character-set=utf8mb4′

Workaround:

1. Modify MY.CNF, annotate or delete default-character-set=utf8mb4 under [client];
2. Add the –no-defaults switch to the command line and use the mysqlbinlog–no-defaults;

Related Article

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.