Mysqlbinlog view MySQL bin log mysqlbinlog:unknown variable ' Default-character-set=utf8 '

Source: Internet
Author: User

Mysqlbinlog mysql-bin.000036 | Less

Query A statement that contains several fields: Mysqlbinlog mysql-bin.000036| Egrep ' (2011030610002460|2011030310001730|2011030410011680|2011030410006280) '
Mysqlbinlog Viewing binary log issues

When using Mysqlbinlog to view the log, a problem was encountered,
The error prompts are as follows:
/usr/local/mysql/bin/mysqlbinlog:unknown variable ' Default-character-set=utf8 '

The reason for this problem is that I have added a my.cnf in the Client option group in the
Default-character-set=utf8

There is still some way to fix this bug,
One way is to use:--no-defaults

Mysqlbinlog--no-defaults-v/mnt/mylv1/mysqldata/bogon-relay-bin.000001

Another way: Use the Mysqlbinlog tool to view the binary log when you reread the MySQL profile my.cnf (under Windows is My.ini), rather than the configuration file that the server has loaded into memory. This means that as long as you modify and save the My.cnf file without restarting the MySQL server, the modified my.cnf configuration file is in effect for Mysqlbinlog when viewed with Mysqlbinlog. So here's how to do this: screen out the DEFAULT-CHARACTER-SET=UTF8 option in the client option group, such as
#default-character-set=utf8
Then run the Mysqlbinlog tool, and no problems will arise. Of course remember when not using the Mysqlbinlog tool, put #default-character-set=utf8
Option reverts to Default-character-set=utf8

Mysqlbinlog view MySQL bin log mysqlbinlog:unknown variable ' Default-character-set=utf8 '

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.