ユーザ用ツール

サイト用ツール


mysql:replicate_error

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
mysql:replicate_error [2014/10/31 06:59] clownclownmysql:replicate_error [2025/02/16 13:53] (現在) – 外部編集 127.0.0.1
行 39: 行 39:
 MASTER_LOG_FILE='mysql-bin.000069', MASTER_LOG_FILE='mysql-bin.000069',
 MASTER_LOG_POS=228146254; MASTER_LOG_POS=228146254;
 +</code>
 +
 +==== Last_IO_Errno: 1594 ====
 +
 +> Last_Errno: 1594
 +> Last_Error: Relay log read failure: 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.
 +
 +  * マスタサーバのバイナリログが破損した
 +  * スレーブサーバのリレーログが破損した
 +など。
 +マスタサーバのバイナリログが破損した場合は、仕方がないので、ダンプから再構築。
 +スレーブサーバのリレーログが破損した場合は、再設定で復旧可能。
 +
 +マスタログのファイル名、ポジションを確認。
 +<code>
 +mysql>show slave status\G
 +*************************** 1. row ***************************
 +               Slave_IO_State: 
 +                  Master_Host: 1.2.3.4
 +                  Master_User: replication
 +                  Master_Port: 3306
 +                Connect_Retry: 60
 +              Master_Log_File: mysql-bin.000230
 +          Read_Master_Log_Pos: 618693587
 +</code>
 +
 +レプリケーションを停止する。
 +<code>
 +mysql> stop slave;
 +</code>
 +
 +レプリケーションを再設定する。
 +<code>
 +mysql> reset slave all;
 +mysql> CHANGE MASTER TO 
 +MASTER_HOST='1.2.3.4',
 +MASTER_USER='replication',
 +MASTER_PASSWORD='password',
 +MASTER_LOG_FILE='mysql-bin.000230',
 +MASTER_LOG_POS=618693587;
 +</code>
 +
 +レプリケーションを再開する。
 +<code>
 +mysql> start slave;
 </code> </code>
mysql/replicate_error.1414738746.txt.gz · 最終更新: 2025/02/16 13:50 (外部編集)