MySQL replication slave error 22 -


i'm having trouble mysql replication on slave side error 22, charset error.

the error stated cannot found charset '#45' find odd since query used stating default character set latin1 collate latin1_swedish_ci , did checked on charset\index.xml , did exists.

master : server version: 5.5.30-log

slave : server version: 5.1.66-log

current replication status:

mysql> show slave status \g; *************************** 1. row ***************************                slave_io_state: waiting master send event                   master_host: 10.10.2.21                   master_user: repl                   master_port: 3306                 connect_retry: 60               master_log_file: mysql-bin.000024           read_master_log_pos: 1065715871                relay_log_file: mysqld-relay-bin.000029                 relay_log_pos: 86980698         relay_master_log_file: mysql-bin.000024              slave_io_running: yes             slave_sql_running: no               replicate_do_db:           replicate_ignore_db:            replicate_do_table:        replicate_ignore_table:       replicate_wild_do_table:   replicate_wild_ignore_table:                    last_errno: 22                    last_error: error 'character set '#45' not compiled character set , not specified in '/usr/share/mysql/charsets/index.xml' file' on query. default database: 'db_businesslounge-backup'. query: 'create database if not exists `db_businesslounge-backup` default character set latin1 collate latin1_swedish_ci'                  skip_counter: 0           exec_master_log_pos: 86980553               relay_log_space: 1065720589               until_condition: none                until_log_file:                 until_log_pos: 0            master_ssl_allowed: no            master_ssl_ca_file:            master_ssl_ca_path:               master_ssl_cert:             master_ssl_cipher:                master_ssl_key:         seconds_behind_master: null master_ssl_verify_server_cert: no                 last_io_errno: 0                 last_io_error:                last_sql_errno: 22                last_sql_error: error 'character set '#45' not compiled character set , not specified in '/usr/share/mysql/charsets/index.xml' file' on query. default database: 'db_businesslounge-backup'. query: 'create database if not exists`db_businesslounge-backup` default character set latin1 collate latin1_swedish_ci' 

mysql's charset\index.xml :

<?xml version='1.0' encoding="utf-8"?>  <charsets max-id="99">  <copyright>   copyright (c) 2003, 2012,  oracle and/or affiliates. rights reserved.    program free software; can redistribute and/or modify   under terms of gnu general public license published   free software foundation; version 2 of license.    program distributed in hope useful,   without warranty; without implied warranty of   merchantability or fitness particular purpose.  see   gnu general public license more details.    should have received copy of gnu general public license   along program; if not, write free software   foundation, inc., 59 temple place, suite 330, boston, ma  02111-1307  usa </copyright>  <description> file lists of available character sets. make maintaining easier please:  - keep records sorted collation number.  - change charsets.max-id when adding new collation. </description> ........ <charset name="latin1">   <family>western</family>   <description>cp1252 west european</description>   <alias>csisolatin1</alias>   <alias>iso-8859-1</alias>   <alias>iso-ir-100</alias>   <alias>iso_8859-1</alias>   <alias>iso_8859-1:1987</alias>   <alias>l1</alias>   <alias>latin1</alias>   <collation name="latin1_german1_ci"   id="5"  order="german duden"/>   <collation name="latin1_swedish_ci"   id="8"  order="finnish, swedish">     <flag>primary</flag>     <flag>compiled</flag>   </collation>   <collation name="latin1_danish_ci"    id="15" order="danish"/>   <collation name="latin1_german2_ci"   id="31" order="german phonebook"        flag="compiled"/>   <collation name="latin1_spanish_ci"   id="94" order="spanish"/>   <collation name="latin1_bin"          id="47" order="binary">     <flag>binary</flag>     <flag>compiled</flag>   </collation>   <collation name="latin1_general_ci"   id="48">     <order>dutch</order>     <order>english</order>     <order>french</order>     <order>german duden</order>     <order>italian</order>     <order>latin</order>     <order>portuguese</order>     <order>spanish</order>   </collation>   <collation name="latin1_general_cs"   id="49">     <order>dutch</order>     <order>english</order>     <order>french</order>     <order>german duden</order>     <order>italian</order>     <order>latin</order>     <order>portuguese</order>     <order>spanish</order>   </collation> </charset> .... </charsets> 

anyone ever experienced particular error?

need suggestions, thank you!

you running newer master , older slave. not supported configuration.

http://dev.mysql.com/doc/refman/5.5/en/replication-compatibility.html

i suspect error not latin1_swedish_ci, utf8mb4_general_ci, may have been active on connection on master query that's failing replicate issued, slave trying execute in context.

i don't think capability (utf8mb4) exists in mysql 5.1, evidenced query below, making yet reason why never run version on slave lower version on master, , when doing upgrades, want upgrade slave first.

select * information_schema.collations id = 45 returns value when run on mysql 5.5 , 5.6 not on 5.1.

upgrading slave correct solution, in pinch, can connect directly slave, issue exact same query yourself, , if works, direct slave skip on event in relay log, since you've executed query yourself. after executing failing query:

set global sql_slave_skip_counter = 1; start slave sql_thread; 

this delicate operation, applicable when know you're doing™ , it's you're going see subsequent errors due same issue, not of benefit unless isolated incident.

on bright side, though it's not ideal upgrade slave while it's stalled on replication error, odds of succeeding , being able continue replication point stopped pretty good.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -