mysql_upgrade引起的master/slave replication中断解决(二)

2014-11-24 13:53:06 · 作者: · 浏览: 2
399/*!*/;
/*!\Cgbk *//*!*/;
SET@@session.character_set_client=28,@@session.collation_connection=28,@@session.collation_server=28/*!*/;
BEGIN
/*!*/;
# at721652223
#13053015:03:19 server id 13084 end_log_pos721652336 Query thread_id=418956 exec_time=0 error_code=0
usePriceDB/*!*/;
SETTIMESTAMP=1369897399/*!*/;
好吧,上面红色部分,执行了这个操作,再看看slave错误日志
13053015:00:53 [ERROR] Incorrect definition of table mysql.proc: expected column'comment' at position 15 to have type text, found type char(64).
13053015:00:53 [ERROR] Slave SQL: Query caused different errors on master andslave. Error on master: message(format)='Cannot load from mysql.%s. The table is probably corrupted' errorcode=1548 ; Error on slave: actual message='no error', error code=0. Defaultdatabase: 'performance_schema'. Query: 'DROP DATABASE IF EXISTSperformance_schema', Error_code: 0
13053015:00:53 [Warning] Slave: Cannot load from mysql.proc. The table is probablycorrupted Error_code: 1548
13053015:00:53 [ERROR] Error running query, slave SQL thread aborted. Fix the problem,and restart the slave SQL thread with "SLAVE START". We stopped atlog 'mysql-bin.002947' position 721651903
5.5的日志错误还是很人性化的,slave停止时读取的binlog 日志文件,位置都很清楚。这为我们restart slave提供了方便。既然是DROP DATABASE IFEXISTS performance_schema 导致的错误,那么跳过这条event。
Slave服务器:
mysql>show variables like '%skip%';
mysql>setglobal sql_slave_skip_counter =1;
mysql>slave start ;
复制正常
总结:复制虽然正常了。为什么 mysql_upgrade 会做 DROP DATABASE IF EXISTSperformance_schema 这个操作?希望遇到类似问题的朋友,一起交流。