Turn: mysqlbinlog: Unknown variable 'default-character-set = gbk' Error

Source: Internet
Author: User
Original works can be reprinted. During reprinting, you must mark the original source, author information, and this statement in hyperlink form. Otherwise, legal liability will be held. Http://cau99.blog.51cto.com/1855224/348798

 

I tried mysqlbinlog today and reported this error. I cannot continue to execute it, and MySQL does not think it is a bug!

 

Cause:

The options under [client] will be read by all client programs (excluding mysqld), but mysqlbinlog cannot recognize default-character-set, however, when the client cannot identify the issue, an error is reported and the task is exited. Can be solved using loose-variable_name = xxx.

Three solutions:

 

 

1. modify my. CNF and comment on or delete the default-character-set = GBK under [client;

2. Add the -- no-defaults switch to the command line and use mysqlbinlog -- no-defaults;

3. Change default-character-set = GBK to (no restart required ):

[Client]

Loose-default-character-set = GBK

In this way, all client programs (including mysqlbinlog) that cannot identify the variable will ignore it, and versions 4.0.2 and later are valid. However, the following warning is still prompted when executing mysqlbinlog:

Warning: mysqlbinlog: Unknown variable 'loose-default-character-set = gbk'

 

 

Reference: http://bugs.mysql.com/bug.php? Id = 11673

 

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.