vendredi 2 janvier 2015

mysql replication master 5.5 slave 5.1 error on create database


I have a replication system where my master has a mysql 5.5 version while the slave is mysql 5.1. I know that this is not supported because the slave version should be greater than the master, but we cannot upgrade yet.


Everything is going fine until a new database is created in the master, then the slave replication fails and shows the error:



Query caused different errors on master and slave.
Error on master: message (format)=
'Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d.
Please use mysql_upgrade to fix this error.' error code=1558 ; Error on slave: actual message='no error', error code=0. Default database: 'newdb'. Query: 'DROP DATABASE newdb'


My workaround is:



set global sql_slave_skip_counter=2;
create database newdb;
start slave


After doing a checksum of all database tables everything seems ok, but we have an awful application that creates databases very often, so I would like to know if there is a way that doesn't imply coding to solve the problem without manually creating the table.





Aucun commentaire:

Enregistrer un commentaire