MySQL Replication 구축 시 Slave_IO_State 가 빈값일 때

If you don’t have any error but your replication slave does not work and you get the following information when you “show slave statusG”:

Slave_IO_Running: No

Step1: check your mysql log file ( mysql log file is in  /var/log/mysqld.log or /var/log/syslog), if you have this error:

Got fatal error 1236: ‘Client requested master to start replication from impossible position’ from master when reading data from binary log

mysql> show slave statusG;

You will find the master log file:
Relay_Master_Log_File: ip-218-129-133-44-bin.000124
and Master log position:
Exec_Master_Log_Pos: 450207777

In your master server:
mysql> show master logs;

You will find a record:   ip-218-129-133-44-bin.000111 |  450207682
If the length of this log file on master is smaller than master log position on slave.
(Here 450207682<450207777)

mysql> Change Master To Master_Log_Pos=450207682;

Restart mysql.

If it still does not work, try to do the replication from beginning following the instructions (master master replication):

Leave a Reply

Your email address will not be published. Required fields are marked *