MySQL Forums
Forum List  »  Install & Repo

Replication: “Relay_Log_Pos” value not equals to the last position when restart slave
Posted by: Azhar Hussain
Date: September 24, 2004 08:26AM

Hi,

I setup replication having configuration, one MASTER [MySQL 4.0.21] and one SLAVE [MySQL 4.0.21]. I follow the steps given in MySQL Replication HowTO [http://dev.mysql.com/doc/mysql/en/Replication_HOWTO.html]. Replication successfully setup. But I have confusion regarding Relay_Log_Pos variable on slave.

During configuration (of replication), before executing query “START SLAVE”, I executed query (Replacing the option values with the actual values relevant to my system)

slave-mysql> CHANGE MASTER TO
-> MASTER_HOST='master_host_name',
-> MASTER_USER='replication_user_name',
-> MASTER_PASSWORD='replication_password',
-> MASTER_LOG_FILE='recorded_log_file_name',
-> MASTER_LOG_POS=recorded_log_position;

Then I execute,

START SLAVE;

Then slave start replication thread and query “SHOW SLAVE STATUS” shows the position correctly and start reading binary log after that position from master.

Confusion is: If I restart mysql service (on slave), it starts slave thread again and starts reading binary log. But when I execute query “SHOW SLAVE STATUS” it shows slave binary log position from the beginning, specifically the column “Relay_Log_Pos” value. My confusion is why this variable value not equals to the last position (before I stop mysql), why restarted. Please help in this regard.

Thank You


Options: ReplyQuote


Subject
Written By
Posted
Replication: “Relay_Log_Pos” value not equals to the last position when restart slave
September 24, 2004 08:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.