SysAdminDay

Tem
28
2009

Broken MySQL Replication !!!

emreyasar_brokenThis morning a MySQL issue welcomed me at the office.

After a bit control I found out the reason of the problem.

A full /var/lib/mysql partition caused to dead of mysql daemon.

MySQL began to operating normally after supplying free space and recovering 3 corrupted tables.

Everything was fine until  I noticed the broken replication.

when I run

mysql> show slave status \G

I got an error message like this:

  • Could not parse relay log event entry. The possible reasons are: the master’s binary log is corrupted (you can check this by running ‘mysqlbinlog’ on the binary log), the slave’s relay log is corrupted (you can check this by running ‘mysqlbinlog’ on the relay log), a network problem, or a bug in the master’s or slave’s MySQL code. If you want to check the master’s binary log or slave’s relay log, you will be able to know their names by issuing ‘SHOW SLAVE STATUS’ on this slave.

And there were an error at mysqld.log as below:

  • [Warning] Neither –relay-log nor –relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use ‘–relay-log=*****-relay-bin’ to avoid this problem.

I restart mysqld on both master and slave but I were getting the same errors again.

And then I tried      stop slave; and     start slave; but the problem were still present.

It was sad but true.  It was time to setup the replicate server again.

And I decided make a last try:

  • stop slave;
  • show slave status \G
  • reset slave;
  • start slave;
  • show slave status;

And everything was OK.

reset slave command was the golden key..

Yaziyi gonderen Admin - Emre Yasar in: Genel | Etiketler: , ,

Yorum yok »

RSS feed for comments on this post. TrackBack URL


Yorum yaz

  

Altyapi WP Temadown Wp Tr Temayapim TheBuckmaker Cevirmen Otel