Character set '# 45' causes the master-slave stop problem.

Source: Internet
Author: User

Today, a student found a problem when building a master-slave environment. Thanks @ 80 s.

Symptom:

Slave_IO_Running stops on the slave database. Last_Error is shown as follows:

Bin/mysqlbinlog: Character set '# 45' is not a compiled character set and is not specified in the'/u01/dingqi. lxb/transfer2/master/share/mysql/charsets/Index. xml 'file

Analysis:

When mysqlbinlog is used to execute the corresponding relaylog file, the above error message is displayed.

View the Index. xml of the prompt location. All character sets provided by this server are recorded here. We found that there is no character set with id 45.

That is why slave is in the same step. parsing errors cause synchronization to stop.

SET @ session. character_set_client = 45, @ session. collation_connection = 45, @ session. collation_server = 33

From this command, a user connects to the master and runs a set names xxx (xxx is the name of a character set), which is translated into 45.

Recurrence:

Find the character set numbered 45. Run the following command on 5.5:

It turns out that this character set is called utf8mb4, which is not yet available in 5.1.

Solution:

The prompt is that the master and slave of the later version are, do not use character sets that are not supported by earlier versions. (therefore, it is not recommended that the master of a later version be synchronized to the slave of a later version ).

For the binlog that already exists in the Master, to allow the Master and slave to continue synchronization, the error code 22 must be added to slave_skip_errors.

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.