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.